@Override
  public void enhanceTaskProcessing(@Nullable Project project,
                                    @NotNull List<String> taskNames,
                                    @NotNull Consumer<String> initScriptConsumer,
                                    @NotNull Map<String, String> parameters) {
    initScriptConsumer.consume(GradleInitScriptUtil.loadCommonTasksUtilsScript());

    String dispatchPort = parameters.get(DEBUG_DISPATCH_PORT_KEY);
    if (dispatchPort == null) {
      return;
    }

    String debugOptions = parameters.get(DEBUG_OPTIONS_KEY);
    if (debugOptions == null) {
      debugOptions = "";
    }
    List<String> lines = new ArrayList<>();

    String classPathInitScript = GradleInitScriptUtil.loadToolingExtensionProvidingInitScript(
      Collections.singleton(ExternalSystemSourceType.class)
    );
    lines.add(classPathInitScript);

    for (DebuggerBackendExtension extension : DebuggerBackendExtension.EP_NAME.getExtensionList()) {
      lines.addAll(extension.initializationCode(project, dispatchPort, debugOptions));
    }

    final String script = join(lines, System.lineSeparator());
    initScriptConsumer.consume(script);
  }
@Override
  public void enhanceTaskProcessing(@Nullable Project project,
                                    @NotNull List<String> taskNames,
                                    @NotNull Consumer<String> initScriptConsumer,
                                    @NotNull Map<String, String> parameters)