public void connectToDebugger(int localPort,
                                @Nullable String debuggerHost,
                                @NotNull Map<String, Boolean> dbgOpts,
                                @NotNull Map<String, String> extraEnvs)
    throws Exception {
    if (waitingForInput) {
      throw new Exception("Can't connect debugger now, waiting for input");
    }
    executeBackgroundTask(
      () -> {
        // though `connectToDebugger` returns "connect complete" string, let us just ignore it
        getPythonConsoleBackendClient().connectToDebugger(localPort, debuggerHost, dbgOpts, extraEnvs);
        return null;
      },
      true,
      PyBundle.message("console.connecting.to.debugger"),
      "Error in connectToDebugger():"
    );
  }
public void connectToDebugger(int localPort,
                                @Nullable String debuggerHost,
                                @NotNull Map<String, Boolean> dbgOpts,
                                @NotNull Map<String, String> extraEnvs)