microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
273 stars 79 forks source link

TerminateThreadRequest #150

Closed roblourens closed 6 years ago

roblourens commented 6 years ago

A client should be able to request to terminate a thread. Should include a capability to indicate whether it's supported by the runtime/adapter.

In vscode, this would probably just be a context menu option on the thread item of the callstack. An extension could implement this easily by contributing a context menu command and sending a custom debug request. Although the context menu command would show up on every row of the callstack, not just threads: https://github.com/Microsoft/vscode/issues/19180

/** TerminateThread request; value of command field is 'terminateThread'.
    The request starts the debuggee to run again.
*/
export interface TerminateThreadRequest extends Request {
    // command: 'terminateThread';
    arguments: TerminateThreadArguments;
}

/** Arguments for 'terminateThread' request. */
export interface TerminateThreadArguments {
    threadId: number;
}

cc @mostafaeweda @ebluestein

weinand commented 6 years ago

See https://github.com/Microsoft/vscode-debugadapter-node/commit/9457a850257dbc6c93ef9c55a155c231f859db50