mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[debugger] Preserve thread information for coroutine-thead stepping
IDEA-381878 IDEA-365578 GitOrigin-RevId: 08052ccea1cd7382efce710372a10e82c12ceab0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
84de3835b1
commit
b4e940ebe4
@@ -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<SuspendContextImpl> myContextRef;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user