void () { disposeDebugProcess(); if (mySession != null) { WriteAction.runAndWait(() -> mySession.stop()); waitFor(mySession.getDebugProcess().getProcessHandler()); //wait for process termination after session.stop() which is async XDebuggerTestUtil.disposeDebugSession(mySession); mySession = null; myDebugProcess = null; myPausedSemaphore = null; } final ExecutionResult result = myExecutionResult; if (myExecutionResult != null) { UIUtil.invokeLaterIfNeeded(() -> Disposer.dispose(result.getExecutionConsole())); myExecutionResult = null; } }