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: Terminate Thread in the context menu of the Frames view #2178
#2153 added "Terminate Thread" (DAP.TerminateThread) to the context menu of the DAP session's own Threads tab
(DAP.Threads.Popup), for #2113. #2113 also asked, as an optional part, for it in the context menu of IntelliJ's Frames
view (XDebugger.Frames.Tree.Popup). That menu exists in 2024.2 and in 2026.3. The action would terminate the thread
of the frame there. #2153 left this out.
Today
A frame doesn't know its thread.DAPExecutionStack has the thread ID, but the frames it creates don't: DAPStackFrame keeps only the client, the DAP StackFrame and the execution epoch. It has two public constructors, (client, stackFrame) and (client, stackFrame, executionEpoch).
The actions of that menu act on the session's current frame.OpenDisassemblyAction, which LSP4IJ already adds
to XDebugger.Frames.Tree.Popup, takes the session from XDebugSession.DATA_KEY and works on its current frame. A
thread action has to make sure it terminates the thread of the frame that was right-clicked. That is the current
frame only if a right-click selects it, which needs a check on 2024.2 and in 2026.3's split debugger.
How it could be done
Give DAPStackFrame its thread ID through a new constructor, keeping the two existing ones. DAPExecutionStack
passes it.
Add DAP.TerminateThread to XDebugger.Frames.Tree.Popup, or a small action that delegates to it. It is enabled
for a DAPStackFrame whose debug adapter supports terminateThreads, and it terminates that frame's thread, as the
Threads tab does.
Test
A session test like DAPTerminateThreadSessionTest: the action on a frame of the worker thread sends terminateThreads with the worker's ID. It isn't offered for an adapter without supportsTerminateThreadsRequest.
Activity
feat: terminate a thread from the context menu of the Frames view of …