public void connect(PydevConsoleCommunication consoleCommunication) throws Exception {
    Pair<String, Integer> portToConnect;
    if (myConsoleDebugProcessHandler.getConsoleProcessHandler() instanceof RemoteProcessControl) {
      portToConnect = getRemoteHostPortForDebuggerConnection(myLocalPort,
                                                             ((RemoteProcessControl)myConsoleDebugProcessHandler.getConsoleProcessHandler()));
    }
    else {
      portToConnect = Pair.create("localhost", myLocalPort);
    }
    Map<String, Boolean> optionsMap = makeDebugOptionsMap(getSession());
    Map<String, String> envs = getDebuggerEnvs(getSession());
    consoleCommunication.connectToDebugger(portToConnect.getSecond(), portToConnect.getFirst(), optionsMap, envs);
  }
public void connect(PydevConsoleCommunication consoleCommunication)