IDEA-155569 Source code does not match appears when the other thread hits a breakpoint
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 4 May 2016 12:48:19 +0000 (15:48 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 4 May 2016 12:49:36 +0000 (15:49 +0300)
java/debugger/impl/src/com/intellij/debugger/impl/DebuggerSession.java

index ace1ce1e15d8d7cafcba64705e4c742a55f1ef84..4a879da562356a4447f52b974e123478307b54f6 100644 (file)
@@ -632,7 +632,9 @@ public class DebuggerSession implements AbstractDebuggerSession {
 
       final DebuggerContextImpl debuggerContext =
         DebuggerContextImpl.createDebuggerContext(DebuggerSession.this, suspendContext, currentThread, null);
 
       final DebuggerContextImpl debuggerContext =
         DebuggerContextImpl.createDebuggerContext(DebuggerSession.this, suspendContext, currentThread, null);
-      debuggerContext.setPositionCache(position);
+      if (suspendContext.getThread() == currentThread) {
+        debuggerContext.setPositionCache(position);
+      }
 
       DebuggerInvocationUtil.invokeLater(getProject(), new Runnable() {
         @Override
 
       DebuggerInvocationUtil.invokeLater(getProject(), new Runnable() {
         @Override