XDebugProcess (@NotNull final XDebugSession session) { PythonDebugLanguageConsoleView debugConsoleView = new PythonDebugLanguageConsoleView(myProject, mySdk); PyConsoleDebugProcessHandler consoleDebugProcessHandler = new PyConsoleDebugProcessHandler(myProcessHandler); PyConsoleDebugProcess consoleDebugProcess = new PyConsoleDebugProcess(session, serverSocket, debugConsoleView, consoleDebugProcessHandler); PythonDebugConsoleCommunication communication = PyDebugRunner .initDebugConsoleView(myProject, consoleDebugProcess, debugConsoleView, consoleDebugProcessHandler, session); communication.addCommunicationListener(new ConsoleCommunicationListener() { @Override public void commandExecuted(boolean more) { session.rebuildViews(); } @Override public void inputRequested() { } }); myPydevConsoleCommunication.setDebugCommunication(communication); debugConsoleView.attachToProcess(consoleDebugProcessHandler); consoleDebugProcess.waitForNextConnection(); try { consoleDebugProcess.connect(myPydevConsoleCommunication); } catch (Exception e) { LOG.error(e); //TODO } myProcessHandler .notifyTextAvailable(PyBundle.message("pydev.console.debugger.connected"), ProcessOutputTypes.STDERR); return consoleDebugProcess; }