private void startServer(GeneralCommandLine commandLine, boolean sudo) throws Exception {
      if (sudo) {
        commandLine = ExecUtil.sudoCommand(commandLine, JavaDebuggerBundle.message("debugger.attach.password.for.sudo"));
      }
      GeneralCommandLine finalCommandLine = commandLine;
      new CapturingProcessHandler.Silent(commandLine) {
        @Override
        protected CapturingProcessAdapter createProcessAdapter(ProcessOutput processOutput) {
          return new CapturingProcessAdapter(processOutput) {
            @Override
            public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType) {
              myDebugProcess.printToConsole(event.getText());
            }

            @Override
            public void processTerminated(@NotNull ProcessEvent event) {
              if (!sudo && myDebugProcess.isInInitialState()) {
                try {
                  startServer(finalCommandLine, true);
                }
                catch (Exception e) {
                  LOG.error(e);
                }
              }
              else {
                myDebugProcess.stop(true);
              }
            }
          };
        }
      }.startNotify();
    }
private void startServer(GeneralCommandLine commandLine, boolean sudo)