Skip to content

Commit

Permalink
Adds a terminateThreads request
Browse files Browse the repository at this point in the history
  • Loading branch information
weinand committed Mar 13, 2018
1 parent 86bfb1c commit 9457a85
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
37 changes: 37 additions & 0 deletions debugProtocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,39 @@
}]
},

"TerminateThreadsRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Terminate thread request; value of command field is 'terminateThreads'.\nThe request terminates one or more threads.",
"properties": {
"command": {
"type": "string",
"enum": [ "terminateThreads" ]
}
},
"required": [ "command" ]
}]
},
"TerminateThreadsArguments": {
"type": "object",
"description": "Arguments for 'terminateThreads' request.",
"properties": {
"threadIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Ids of threads to be terminated."
}
}
},
"TerminateThreadsResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to 'terminateThreads' request. This is just an acknowledgement, so no body field is required."
}]
},

"ModulesRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
Expand Down Expand Up @@ -2136,6 +2169,10 @@
"supportsLogPoints": {
"type": "boolean",
"description": "The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint."
},
"supportsTerminateThreadsRequest": {
"type": "boolean",
"description": "The debug adapter supports the 'terminateThreads' request."
}
}
},
Expand Down
1 change: 1 addition & 0 deletions protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This npm module contains declarations for the json-based Visual Studio Code debu

* 1.28.x:
* Adds an optional attribute `clientName` to the `Initialize` request. This makes it possible to surface the human readable name of the client in error messages coming from the adapter.
* Adds a `terminateThreads` request and a corresponding `supportsTerminateThreadsRequest` capability.

* 1.27.x:
* Adds a new `capabilities` event that hints to the frontend that one or more capabilities got updated.
Expand Down
19 changes: 19 additions & 0 deletions protocol/src/debugProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,23 @@ export module DebugProtocol {
};
}

/** Terminate thread request; value of command field is 'terminateThreads'.
The request terminates one or more threads.
*/
export interface TerminateThreadsRequest extends Request {
// command: 'terminateThreads';
}

/** Arguments for 'terminateThreads' request. */
export interface TerminateThreadsArguments {
/** Ids of threads to be terminated. */
threadIds?: number[];
}

/** Response to 'terminateThreads' request. This is just an acknowledgement, so no body field is required. */
export interface TerminateThreadsResponse extends Response {
}

/** Modules can be retrieved from the debug adapter with the ModulesRequest which can either return all modules or a range of modules to support paging. */
export interface ModulesRequest extends Request {
// command: 'modules';
Expand Down Expand Up @@ -1093,6 +1110,8 @@ export module DebugProtocol {
supportsLoadedSourcesRequest?: boolean;
/** The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint. */
supportsLogPoints?: boolean;
/** The debug adapter supports the 'terminateThreads' request. */
supportsTerminateThreadsRequest?: boolean;
}

/** An ExceptionBreakpointsFilter is shown in the UI as an option for configuring how exceptions are dealt with. */
Expand Down

0 comments on commit 9457a85

Please sign in to comment.