@Override
  public void run() {
    final Debugger client = connect();
    if (client == null) {
      // client will be null if the process terminated prematurely for some reason. no need for an error message
      if (!myProcess.isProcessTerminated()) {
        myProcess.notifyTextAvailable("Failed to connect to debugged process. Terminating.\n", ProcessOutputTypes.SYSTEM);
        myProcess.destroyProcess();
      }
      return;
    }

    final XsltDebuggerSession session = XsltDebuggerSession.create(myProject, myProcess, client);

    final XsltDebugProcess dbgp = XsltDebugProcess.getInstance(myProcess);
    assert dbgp != null;
    dbgp.init(client);

    session.addListener(new XsltDebuggerSession.Listener() {
      @Override
      public void debuggerSuspended() {
        final OutputEventQueue queue = client.getEventQueue();
        StructureTabComponent.getInstance(myProcess).getEventModel().update(queue.getEvents());
      }

      @Override
      public void debuggerResumed() {
      }

      @Override
      public void debuggerStopped() {
        try {
          final OutputEventQueue queue = client.getEventQueue();
          StructureTabComponent.getInstance(myProcess).getEventModel().finalUpdate(queue.getEvents());
        } catch (Exception e) {
          // can fail when debugger is manually terminated
        }
      }
    });

    session.start();
  }
@Override
  public void run()