diff --git a/java/debugger/impl/src/com/intellij/debugger/impl/DebuggerSession.java b/java/debugger/impl/src/com/intellij/debugger/impl/DebuggerSession.java index adf320988fd4..bb25a1da8548 100644 --- a/java/debugger/impl/src/com/intellij/debugger/impl/DebuggerSession.java +++ b/java/debugger/impl/src/com/intellij/debugger/impl/DebuggerSession.java @@ -95,13 +95,9 @@ public final class DebuggerSession implements AbstractDebuggerSession { private boolean myModifiedClassesScanRequired = false; - public boolean isSteppingThrough(ThreadReferenceProxyImpl threadProxy) { - return Comparing.equal(mySteppingThroughThread.get(), threadProxy); - } - public void setSteppingThrough(ThreadReferenceProxyImpl threadProxy) { LightOrRealThreadInfo filterThread = myDebugProcess.getRequestsManager().getFilterThread(); - if (filterThread != null && filterThread.getRealThread() != null) { + if (filterThread == null || filterThread.getRealThread() != null) { mySteppingThroughThread.set(threadProxy); } else { @@ -732,7 +728,7 @@ public final class DebuggerSession implements AbstractDebuggerSession { @Override public void resumed(SuspendContextImpl suspendContext) { SuspendContextImpl context = getProcess().getSuspendManager().getPausedContext(); - ThreadReferenceProxyImpl steppingThread = getSteppingThread(suspendContext); + ThreadReferenceProxyImpl steppingThread = suspendContext.getSuspendPolicy() == EventRequest.SUSPEND_EVENT_THREAD ? suspendContext.getThread() : null; DebuggerInvocationUtil.invokeLater(getProject(), () -> { if (myDebugProcess.isSteppingInProgress() && context != null) { @@ -818,13 +814,6 @@ public final class DebuggerSession implements AbstractDebuggerSession { getContextManager().setState(debuggerContext, State.IN_STEPPING, Event.CONTEXT, getDescription(debuggerContext)); } - public @Nullable ThreadReferenceProxyImpl getSteppingThread(@NotNull SuspendContextImpl suspendContext) { - if (suspendContext.getSuspendPolicy() == EventRequest.SUSPEND_EVENT_THREAD && isSteppingThrough(suspendContext.getThread())) { - return suspendContext.getThread(); - } - return null; - } - private static class BreakpointReachedNotificationListener extends NotificationListener.Adapter { private final WeakReference myContextRef;