Skip to content

Commit e66ab1b

Browse files
committed
add progress support; see microsoft/debug-adapter-protocol#92
1 parent 3f8d7b0 commit e66ab1b

File tree

9 files changed

+537
-167
lines changed

9 files changed

+537
-167
lines changed

adapter/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

adapter/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vscode-debugadapter",
33
"description": "Debug adapter implementation for node",
4-
"version": "1.39.1",
4+
"version": "1.40.0-pre.2",
55
"author": "Microsoft Corporation",
66
"license": "MIT",
77
"repository": {
@@ -15,7 +15,7 @@
1515
"typings": "./lib/main",
1616
"dependencies": {
1717
"mkdirp": "^0.5.1",
18-
"vscode-debugprotocol": "1.39.0"
18+
"vscode-debugprotocol": "1.40.0-pre.1"
1919
},
2020
"devDependencies": {
2121
"@types/mkdirp": "^0.5.2",

adapter/src/debugSession.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,56 @@ export class CapabilitiesEvent extends Event implements DebugProtocol.Capabiliti
274274
}
275275
}
276276

277+
export class ProgressStartEvent extends Event implements DebugProtocol.ProgressStartEvent {
278+
body: {
279+
progressId: string,
280+
title: string
281+
};
282+
283+
public constructor(progressId: string, title: string, message?: string) {
284+
super('progressStart');
285+
this.body = {
286+
progressId: progressId,
287+
title: title
288+
};
289+
if (typeof message === 'string') {
290+
(this as DebugProtocol.ProgressStartEvent).body.message = message;
291+
}
292+
}
293+
}
294+
295+
export class ProgressUpdateEvent extends Event implements DebugProtocol.ProgressUpdateEvent {
296+
body: {
297+
progressId: string
298+
};
299+
300+
public constructor(progressId: string, message?: string) {
301+
super('progressUpdate');
302+
this.body = {
303+
progressId: progressId
304+
};
305+
if (typeof message === 'string') {
306+
(this as DebugProtocol.ProgressUpdateEvent).body.message = message;
307+
}
308+
}
309+
}
310+
311+
export class ProgressEndEvent extends Event implements DebugProtocol.ProgressEndEvent {
312+
body: {
313+
progressId: string
314+
};
315+
316+
public constructor(progressId: string, message?: string) {
317+
super('progressEnd');
318+
this.body = {
319+
progressId: progressId
320+
};
321+
if (typeof message === 'string') {
322+
(this as DebugProtocol.ProgressEndEvent).body.message = message;
323+
}
324+
}
325+
}
326+
277327
export enum ErrorDestination {
278328
User = 1,
279329
Telemetry = 2
@@ -642,6 +692,9 @@ export class DebugSession extends ProtocolServer {
642692
/** The debug adapter does not support the 'breakpointLocations' request. */
643693
response.body.supportsBreakpointLocationsRequest = false;
644694

695+
/** The debug adapter does not support the 'clipboard' context value in the 'evaluate' request. */
696+
response.body.supportsClipboardContext = false;
697+
645698
this.sendResponse(response);
646699
}
647700

adapter/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import {
88
DebugSession,
9-
InitializedEvent, TerminatedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent, LoadedSourceEvent, CapabilitiesEvent,
9+
InitializedEvent, TerminatedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent, LoadedSourceEvent, CapabilitiesEvent, ProgressStartEvent, ProgressUpdateEvent, ProgressEndEvent,
1010
Thread, StackFrame, Scope, Variable,
1111
Breakpoint, Source, Module, CompletionItem,
1212
ErrorDestination
@@ -23,7 +23,7 @@ export {
2323
LoggingDebugSession,
2424
Logger,
2525
logger,
26-
InitializedEvent, TerminatedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent, LoadedSourceEvent, CapabilitiesEvent,
26+
InitializedEvent, TerminatedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent, LoadedSourceEvent, CapabilitiesEvent, ProgressStartEvent, ProgressUpdateEvent, ProgressEndEvent,
2727
Thread, StackFrame, Scope, Variable,
2828
Breakpoint, Source, Module, CompletionItem,
2929
ErrorDestination,

debugProtocol.json

Lines changed: 198 additions & 82 deletions
Large diffs are not rendered by default.

protocol/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vscode-debugprotocol",
33
"description": "Npm module with declarations for the Visual Studio Code debug protocol",
4-
"version": "1.39.0",
4+
"version": "1.40.0-pre.1",
55
"author": "Microsoft Corporation",
66
"license": "MIT",
77
"repository": {

protocol/src/debugProtocol.ts

Lines changed: 271 additions & 70 deletions
Large diffs are not rendered by default.

testSupport/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testSupport/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vscode-debugadapter-testsupport",
33
"description": "Npm module with mocha test support for Visual Studio Code debug adapters",
4-
"version": "1.40.2",
4+
"version": "1.40.3-pre.1",
55
"author": "Microsoft Corporation",
66
"license": "MIT",
77
"repository": {
@@ -14,7 +14,7 @@
1414
"main": "./lib/main.js",
1515
"typings": "./lib/main",
1616
"dependencies": {
17-
"vscode-debugprotocol": "1.39.0"
17+
"vscode-debugprotocol": "1.40.0-pre.1"
1818
},
1919
"devDependencies": {
2020
"@types/node": "8.9.3",

0 commit comments

Comments
 (0)