forked tests debugging: fixed assert on reattach
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 8 May 2015 18:38:43 +0000 (21:38 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 8 May 2015 18:38:43 +0000 (21:38 +0300)
java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessImpl.java

index 13ef8d37cd5c33241ab2ff18f8297db9e0add90d..3bd67509e586ae161f8e5b28785bbb22f196049d 100644 (file)
@@ -1769,7 +1769,12 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
     ApplicationManager.getApplication().assertIsDispatchThread(); //TODO: remove this requirement
     ((XDebugSessionImpl)getXdebugProcess().getSession()).reset();
     myState.set(STATE_INITIAL);
-    myRequestManager.processDetached(this, false);
+    getManagerThread().schedule(new DebuggerCommandImpl() {
+      @Override
+      protected void action() throws Exception {
+        myRequestManager.processDetached(DebugProcessImpl.this, false);
+      }
+    });
     myConnection = environment.getRemoteConnection();
     getManagerThread().restartIfNeeded();
     createVirtualMachine(environment.getSessionName(), environment.isPollConnection());