You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DAP: when the selected thread continues alone, select the thread where the session stays suspended #2184
A thread other than the one where the session is suspended continues alone (a continued event with allThreadsContinued: false). With #2181, the session stays suspended at the stopped thread, the Threads tab shows the
other thread as running, and that thread's stack in the Frames view says "Frames not available: the thread is running".
But if that other thread was the one selected in the Frames view, the selection stays on it:
Stale views: the current frame, the Variables view and the execution point stay on the frame of its stop.
Step and Resume act on the wrong thread.DAPDebugProcess takes the thread from DAPSuspendContext.getThreadId(),
the thread of the active stack, so a step sends next for a thread that is running. Since feat: a DAP debug session shows the program running when the debug adapter says that it continued #2174 the client knows
which thread stopped (DAPSuspendContext.getStoppedThreadId()), but stepping deliberately uses the selected stack.
Expected
When the selected thread continues alone while the session stays suspended at another thread:
the selection moves to the stopped thread's top frame;
the Variables view and the execution point follow it;
Step and Resume act on the stopped thread.
How it could be done
In the continued handling of DAPClient, after the views are rebuilt: if the session's current frame belongs to
the thread that continued, call session.setCurrentStackFrame(stoppedStack, topFrame, true). This must run on the
EDT, since the 2024.2 Frames view asserts it there. Also make the stopped thread's stack the context's active stack.
setCurrentStackFrame is public API, and reaches the frontend of 2026.3's split debugger.
Test
A session test like DAPThreadRunStateSessionTest (#2181):
main stops, the worker is selected, then the worker continues alone;
Activity
feat: when the selected thread of a DAP session continues alone, the …