Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gjsjohnmurray committed Sep 13, 2019
1 parent dfbb374 commit 3d6e356
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/mockDebug.ts
Expand Up @@ -103,6 +103,9 @@ export class MockDebugSession extends LoggingDebugSession {
// make VS Code to show a 'step back' button
response.body.supportsStepBack = true;

// we implement setVariableRequest
response.body.supportsSetVariable = true;

// make VS Code to support data breakpoints
response.body.supportsDataBreakpoints = true;

Expand Down Expand Up @@ -247,6 +250,18 @@ export class MockDebugSession extends LoggingDebugSession {
};
this.sendResponse(response);
}
protected async setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): Promise<void> {

// To show issue #80464, fail every attempt
response.success = false;
response.message = 'Not yet implemented';

// Workaround for https://github.com/microsoft/vscode/issues/80464#issuecomment-530713561
if (!response.success) {
throw new Error(response.message);
}
this.sendResponse(response);
}

protected continueRequest(response: DebugProtocol.ContinueResponse, args: DebugProtocol.ContinueArguments): void {
this._runtime.continue();
Expand Down

0 comments on commit 3d6e356

Please sign in to comment.