@codingame/monaco-vscode-debug-service-override 4.5.0 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +105 -150
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +258 -529
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +28 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +44 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +84 -163
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +116 -120
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +7 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +78 -140
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +72 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +25 -28
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +16 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +140 -132
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +218 -175
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +5 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +9 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +69 -110
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +68 -53
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +77 -56
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +50 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +13 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +22 -51
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +47 -73
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +60 -76
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +14 -43
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +23 -42
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +17 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +56 -94
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +40 -79
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +55 -57
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +14 -28
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +12 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +71 -146
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +92 -111
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +5 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +5 -12
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +42 -22
- package/debug.d.ts +0 -5
|
@@ -37,6 +37,7 @@ import { getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
|
37
37
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
38
38
|
import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
39
39
|
|
|
40
|
+
const _moduleId = "vs/workbench/contrib/debug/browser/debugSession";
|
|
40
41
|
const TRIGGERED_BREAKPOINT_MAX_DELAY = 1500;
|
|
41
42
|
let DebugSession = class DebugSession {
|
|
42
43
|
constructor(id, _configuration, root, model, options, debugService, telemetryService, hostService, configurationService, paneCompositeService, workspaceContextService, productService, notificationService, lifecycleService, uriIdentityService, instantiationService, customEndpointTelemetryService, workbenchEnvironmentService, logService) {
|
|
@@ -58,34 +59,34 @@ let DebugSession = class DebugSession {
|
|
|
58
59
|
this.workbenchEnvironmentService = workbenchEnvironmentService;
|
|
59
60
|
this.logService = logService;
|
|
60
61
|
this.initialized = false;
|
|
61
|
-
this.sources = ( new Map());
|
|
62
|
-
this.threads = ( new Map());
|
|
62
|
+
this.sources = ( (new Map()));
|
|
63
|
+
this.threads = ( (new Map()));
|
|
63
64
|
this.threadIds = [];
|
|
64
|
-
this.cancellationMap = ( new Map());
|
|
65
|
-
this.rawListeners = ( new DisposableStore());
|
|
66
|
-
this.globalDisposables = ( new DisposableStore());
|
|
65
|
+
this.cancellationMap = ( (new Map()));
|
|
66
|
+
this.rawListeners = ( (new DisposableStore()));
|
|
67
|
+
this.globalDisposables = ( (new DisposableStore()));
|
|
67
68
|
this.stoppedDetails = [];
|
|
68
|
-
this.statusQueue = this.rawListeners.add(( new ThreadStatusScheduler()));
|
|
69
|
-
this._onDidChangeState = ( new Emitter());
|
|
70
|
-
this._onDidEndAdapter = ( new Emitter());
|
|
71
|
-
this._onDidLoadedSource = ( new Emitter());
|
|
72
|
-
this._onDidCustomEvent = ( new Emitter());
|
|
73
|
-
this._onDidProgressStart = ( new Emitter());
|
|
74
|
-
this._onDidProgressUpdate = ( new Emitter());
|
|
75
|
-
this._onDidProgressEnd = ( new Emitter());
|
|
76
|
-
this._onDidInvalidMemory = ( new Emitter());
|
|
77
|
-
this._onDidChangeREPLElements = ( new Emitter());
|
|
78
|
-
this._onDidChangeName = ( new Emitter());
|
|
69
|
+
this.statusQueue = this.rawListeners.add(( (new ThreadStatusScheduler())));
|
|
70
|
+
this._onDidChangeState = ( (new Emitter()));
|
|
71
|
+
this._onDidEndAdapter = ( (new Emitter()));
|
|
72
|
+
this._onDidLoadedSource = ( (new Emitter()));
|
|
73
|
+
this._onDidCustomEvent = ( (new Emitter()));
|
|
74
|
+
this._onDidProgressStart = ( (new Emitter()));
|
|
75
|
+
this._onDidProgressUpdate = ( (new Emitter()));
|
|
76
|
+
this._onDidProgressEnd = ( (new Emitter()));
|
|
77
|
+
this._onDidInvalidMemory = ( (new Emitter()));
|
|
78
|
+
this._onDidChangeREPLElements = ( (new Emitter()));
|
|
79
|
+
this._onDidChangeName = ( (new Emitter()));
|
|
79
80
|
this._options = options || {};
|
|
80
81
|
this.parentSession = this._options.parentSession;
|
|
81
82
|
if (this.hasSeparateRepl()) {
|
|
82
|
-
this.repl = ( new ReplModel(this.configurationService));
|
|
83
|
+
this.repl = ( (new ReplModel(this.configurationService)));
|
|
83
84
|
}
|
|
84
85
|
else {
|
|
85
86
|
this.repl = this.parentSession.repl;
|
|
86
87
|
}
|
|
87
88
|
const toDispose = this.globalDisposables;
|
|
88
|
-
const replListener = toDispose.add(( new MutableDisposable()));
|
|
89
|
+
const replListener = toDispose.add(( (new MutableDisposable())));
|
|
89
90
|
replListener.value = this.repl.onDidChangeElements(() => this._onDidChangeREPLElements.fire());
|
|
90
91
|
if (lifecycleService) {
|
|
91
92
|
toDispose.add(lifecycleService.onWillShutdown(() => {
|
|
@@ -97,8 +98,8 @@ let DebugSession = class DebugSession {
|
|
|
97
98
|
if (compoundRoot) {
|
|
98
99
|
toDispose.add(compoundRoot.onDidSessionStop(() => this.terminate()));
|
|
99
100
|
}
|
|
100
|
-
this.passFocusScheduler = ( new RunOnceScheduler(() => {
|
|
101
|
-
if (( this.debugService.getModel().getSessions().some(s => s.state === 2 )) || ( this.getAllThreads().some(t => t.stopped))) {
|
|
101
|
+
this.passFocusScheduler = ( (new RunOnceScheduler(() => {
|
|
102
|
+
if (( (this.debugService.getModel().getSessions().some(s => s.state === 2 ))) || ( (this.getAllThreads().some(t => t.stopped)))) {
|
|
102
103
|
if (typeof this.lastContinuedThreadId === 'number') {
|
|
103
104
|
const thread = this.debugService.getViewModel().focusedThread;
|
|
104
105
|
if (thread && thread.threadId === this.lastContinuedThreadId && !thread.stopped) {
|
|
@@ -114,7 +115,7 @@ let DebugSession = class DebugSession {
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
}, 800));
|
|
118
|
+
}, 800)));
|
|
118
119
|
const parent = this._options.parentSession;
|
|
119
120
|
if (parent) {
|
|
120
121
|
toDispose.add(parent.onDidEndAdapter(() => {
|
|
@@ -133,7 +134,9 @@ let DebugSession = class DebugSession {
|
|
|
133
134
|
this._subId = subId;
|
|
134
135
|
}
|
|
135
136
|
getMemory(memoryReference) {
|
|
136
|
-
return (
|
|
137
|
+
return (
|
|
138
|
+
(new MemoryRegion(memoryReference, this))
|
|
139
|
+
);
|
|
137
140
|
}
|
|
138
141
|
get subId() {
|
|
139
142
|
return this._subId;
|
|
@@ -193,7 +196,7 @@ let DebugSession = class DebugSession {
|
|
|
193
196
|
if (focusedThread && focusedThread.session === this) {
|
|
194
197
|
return focusedThread.stopped ? 2 : 3 ;
|
|
195
198
|
}
|
|
196
|
-
if (( this.getAllThreads().some(t => t.stopped))) {
|
|
199
|
+
if (( (this.getAllThreads().some(t => t.stopped)))) {
|
|
197
200
|
return 2 ;
|
|
198
201
|
}
|
|
199
202
|
return 3 ;
|
|
@@ -272,7 +275,12 @@ let DebugSession = class DebugSession {
|
|
|
272
275
|
}
|
|
273
276
|
async launchOrAttach(config) {
|
|
274
277
|
if (!this.raw) {
|
|
275
|
-
throw new Error(localizeWithPath(
|
|
278
|
+
throw ( (new Error(localizeWithPath(
|
|
279
|
+
_moduleId,
|
|
280
|
+
0,
|
|
281
|
+
"No debugger available, can not send '{0}'",
|
|
282
|
+
'launch or attach'
|
|
283
|
+
))));
|
|
276
284
|
}
|
|
277
285
|
if (this.parentSession && this.parentSession.state === 0 ) {
|
|
278
286
|
throw canceled();
|
|
@@ -323,7 +331,9 @@ let DebugSession = class DebugSession {
|
|
|
323
331
|
}
|
|
324
332
|
async restart() {
|
|
325
333
|
if (!this.raw) {
|
|
326
|
-
throw new Error(
|
|
334
|
+
throw ( (new Error(
|
|
335
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'restart')
|
|
336
|
+
)));
|
|
327
337
|
}
|
|
328
338
|
this.cancelAllRequests();
|
|
329
339
|
if (this._options.lifecycleManagedByParent && this.parentSession) {
|
|
@@ -335,7 +345,9 @@ let DebugSession = class DebugSession {
|
|
|
335
345
|
}
|
|
336
346
|
async sendBreakpoints(modelUri, breakpointsToSend, sourceModified) {
|
|
337
347
|
if (!this.raw) {
|
|
338
|
-
throw new Error(
|
|
348
|
+
throw ( (new Error(
|
|
349
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'breakpoints')
|
|
350
|
+
)));
|
|
339
351
|
}
|
|
340
352
|
if (!this.raw.readyForBreakpoints) {
|
|
341
353
|
return Promise.resolve(undefined);
|
|
@@ -349,12 +361,12 @@ let DebugSession = class DebugSession {
|
|
|
349
361
|
}
|
|
350
362
|
const response = await this.raw.setBreakpoints({
|
|
351
363
|
source: rawSource,
|
|
352
|
-
lines: ( breakpointsToSend.map(bp => bp.sessionAgnosticData.lineNumber)),
|
|
353
|
-
breakpoints: ( breakpointsToSend.map(bp => bp.toDAP())),
|
|
364
|
+
lines: ( (breakpointsToSend.map(bp => bp.sessionAgnosticData.lineNumber))),
|
|
365
|
+
breakpoints: ( (breakpointsToSend.map(bp => bp.toDAP()))),
|
|
354
366
|
sourceModified
|
|
355
367
|
});
|
|
356
368
|
if (response?.body) {
|
|
357
|
-
const data = ( new Map());
|
|
369
|
+
const data = ( (new Map()));
|
|
358
370
|
for (let i = 0; i < breakpointsToSend.length; i++) {
|
|
359
371
|
data.set(breakpointsToSend[i].getId(), response.body.breakpoints[i]);
|
|
360
372
|
}
|
|
@@ -363,12 +375,17 @@ let DebugSession = class DebugSession {
|
|
|
363
375
|
}
|
|
364
376
|
async sendFunctionBreakpoints(fbpts) {
|
|
365
377
|
if (!this.raw) {
|
|
366
|
-
throw new Error(localizeWithPath(
|
|
378
|
+
throw ( (new Error(localizeWithPath(
|
|
379
|
+
_moduleId,
|
|
380
|
+
0,
|
|
381
|
+
"No debugger available, can not send '{0}'",
|
|
382
|
+
'function breakpoints'
|
|
383
|
+
))));
|
|
367
384
|
}
|
|
368
385
|
if (this.raw.readyForBreakpoints) {
|
|
369
|
-
const response = await this.raw.setFunctionBreakpoints({ breakpoints: ( fbpts.map(bp => bp.toDAP())) });
|
|
386
|
+
const response = await this.raw.setFunctionBreakpoints({ breakpoints: ( (fbpts.map(bp => bp.toDAP()))) });
|
|
370
387
|
if (response?.body) {
|
|
371
|
-
const data = ( new Map());
|
|
388
|
+
const data = ( (new Map()));
|
|
372
389
|
for (let i = 0; i < fbpts.length; i++) {
|
|
373
390
|
data.set(fbpts[i].getId(), response.body.breakpoints[i]);
|
|
374
391
|
}
|
|
@@ -378,21 +395,26 @@ let DebugSession = class DebugSession {
|
|
|
378
395
|
}
|
|
379
396
|
async sendExceptionBreakpoints(exbpts) {
|
|
380
397
|
if (!this.raw) {
|
|
381
|
-
throw new Error(localizeWithPath(
|
|
398
|
+
throw ( (new Error(localizeWithPath(
|
|
399
|
+
_moduleId,
|
|
400
|
+
0,
|
|
401
|
+
"No debugger available, can not send '{0}'",
|
|
402
|
+
'exception breakpoints'
|
|
403
|
+
))));
|
|
382
404
|
}
|
|
383
405
|
if (this.raw.readyForBreakpoints) {
|
|
384
406
|
const args = this.capabilities.supportsExceptionFilterOptions ? {
|
|
385
407
|
filters: [],
|
|
386
|
-
filterOptions: ( exbpts.map(exb => {
|
|
408
|
+
filterOptions: ( (exbpts.map(exb => {
|
|
387
409
|
if (exb.condition) {
|
|
388
410
|
return { filterId: exb.filter, condition: exb.condition };
|
|
389
411
|
}
|
|
390
412
|
return { filterId: exb.filter };
|
|
391
|
-
}))
|
|
392
|
-
} : { filters: ( exbpts.map(exb => exb.filter)) };
|
|
413
|
+
})))
|
|
414
|
+
} : { filters: ( (exbpts.map(exb => exb.filter))) };
|
|
393
415
|
const response = await this.raw.setExceptionBreakpoints(args);
|
|
394
416
|
if (response?.body && response.body.breakpoints) {
|
|
395
|
-
const data = ( new Map());
|
|
417
|
+
const data = ( (new Map()));
|
|
396
418
|
for (let i = 0; i < exbpts.length; i++) {
|
|
397
419
|
data.set(exbpts[i].getId(), response.body.breakpoints[i]);
|
|
398
420
|
}
|
|
@@ -402,7 +424,9 @@ let DebugSession = class DebugSession {
|
|
|
402
424
|
}
|
|
403
425
|
dataBytesBreakpointInfo(address, bytes) {
|
|
404
426
|
if (this.raw?.capabilities.supportsDataBreakpointBytes === false) {
|
|
405
|
-
throw new Error(
|
|
427
|
+
throw ( (new Error(
|
|
428
|
+
localizeWithPath(_moduleId, 1, "Session does not support breakpoints with bytes")
|
|
429
|
+
)));
|
|
406
430
|
}
|
|
407
431
|
return this._dataBreakpointInfo({ name: address, bytes, asAddress: true });
|
|
408
432
|
}
|
|
@@ -411,20 +435,30 @@ let DebugSession = class DebugSession {
|
|
|
411
435
|
}
|
|
412
436
|
async _dataBreakpointInfo(args) {
|
|
413
437
|
if (!this.raw) {
|
|
414
|
-
throw new Error(localizeWithPath(
|
|
438
|
+
throw ( (new Error(localizeWithPath(
|
|
439
|
+
_moduleId,
|
|
440
|
+
0,
|
|
441
|
+
"No debugger available, can not send '{0}'",
|
|
442
|
+
'data breakpoints info'
|
|
443
|
+
))));
|
|
415
444
|
}
|
|
416
445
|
if (!this.raw.readyForBreakpoints) {
|
|
417
|
-
throw new Error(localizeWithPath(
|
|
446
|
+
throw ( (new Error(localizeWithPath(_moduleId, 2, "Session is not ready for breakpoints"))));
|
|
418
447
|
}
|
|
419
448
|
const response = await this.raw.dataBreakpointInfo(args);
|
|
420
449
|
return response?.body;
|
|
421
450
|
}
|
|
422
451
|
async sendDataBreakpoints(dataBreakpoints) {
|
|
423
452
|
if (!this.raw) {
|
|
424
|
-
throw new Error(localizeWithPath(
|
|
453
|
+
throw ( (new Error(localizeWithPath(
|
|
454
|
+
_moduleId,
|
|
455
|
+
0,
|
|
456
|
+
"No debugger available, can not send '{0}'",
|
|
457
|
+
'data breakpoints'
|
|
458
|
+
))));
|
|
425
459
|
}
|
|
426
460
|
if (this.raw.readyForBreakpoints) {
|
|
427
|
-
const converted = await Promise.all(( dataBreakpoints.map(async (bp) => {
|
|
461
|
+
const converted = await Promise.all(( (dataBreakpoints.map(async (bp) => {
|
|
428
462
|
try {
|
|
429
463
|
const dap = await bp.toDAP(this);
|
|
430
464
|
return { dap, bp };
|
|
@@ -432,10 +466,10 @@ let DebugSession = class DebugSession {
|
|
|
432
466
|
catch (e) {
|
|
433
467
|
return { bp, message: e.message };
|
|
434
468
|
}
|
|
435
|
-
})));
|
|
436
|
-
const response = await this.raw.setDataBreakpoints({ breakpoints: ( converted.map(d => d.dap)).filter(isDefined) });
|
|
469
|
+
}))));
|
|
470
|
+
const response = await this.raw.setDataBreakpoints({ breakpoints: ( (converted.map(d => d.dap))).filter(isDefined) });
|
|
437
471
|
if (response?.body) {
|
|
438
|
-
const data = ( new Map());
|
|
472
|
+
const data = ( (new Map()));
|
|
439
473
|
let i = 0;
|
|
440
474
|
for (const dap of converted) {
|
|
441
475
|
if (!dap.dap) {
|
|
@@ -451,12 +485,17 @@ let DebugSession = class DebugSession {
|
|
|
451
485
|
}
|
|
452
486
|
async sendInstructionBreakpoints(instructionBreakpoints) {
|
|
453
487
|
if (!this.raw) {
|
|
454
|
-
throw new Error(localizeWithPath(
|
|
488
|
+
throw ( (new Error(localizeWithPath(
|
|
489
|
+
_moduleId,
|
|
490
|
+
0,
|
|
491
|
+
"No debugger available, can not send '{0}'",
|
|
492
|
+
'instruction breakpoints'
|
|
493
|
+
))));
|
|
455
494
|
}
|
|
456
495
|
if (this.raw.readyForBreakpoints) {
|
|
457
|
-
const response = await this.raw.setInstructionBreakpoints({ breakpoints: ( instructionBreakpoints.map(ib => ib.toDAP())) });
|
|
496
|
+
const response = await this.raw.setInstructionBreakpoints({ breakpoints: ( (instructionBreakpoints.map(ib => ib.toDAP()))) });
|
|
458
497
|
if (response?.body) {
|
|
459
|
-
const data = ( new Map());
|
|
498
|
+
const data = ( (new Map()));
|
|
460
499
|
for (let i = 0; i < instructionBreakpoints.length; i++) {
|
|
461
500
|
data.set(instructionBreakpoints[i].getId(), response.body.breakpoints[i]);
|
|
462
501
|
}
|
|
@@ -466,14 +505,19 @@ let DebugSession = class DebugSession {
|
|
|
466
505
|
}
|
|
467
506
|
async breakpointsLocations(uri, lineNumber) {
|
|
468
507
|
if (!this.raw) {
|
|
469
|
-
throw new Error(localizeWithPath(
|
|
508
|
+
throw ( (new Error(localizeWithPath(
|
|
509
|
+
_moduleId,
|
|
510
|
+
0,
|
|
511
|
+
"No debugger available, can not send '{0}'",
|
|
512
|
+
'breakpoints locations'
|
|
513
|
+
))));
|
|
470
514
|
}
|
|
471
515
|
const source = this.getRawSource(uri);
|
|
472
516
|
const response = await this.raw.breakpointLocations({ source, line: lineNumber });
|
|
473
517
|
if (!response || !response.body || !response.body.breakpoints) {
|
|
474
518
|
return [];
|
|
475
519
|
}
|
|
476
|
-
const positions = ( response.body.breakpoints.map(bp => ({ lineNumber: bp.line, column: bp.column || 1 })));
|
|
520
|
+
const positions = ( (response.body.breakpoints.map(bp => ({ lineNumber: bp.line, column: bp.column || 1 }))));
|
|
477
521
|
return distinct(positions, p => `${p.lineNumber}:${p.column}`);
|
|
478
522
|
}
|
|
479
523
|
getDebugProtocolBreakpoint(breakpointId) {
|
|
@@ -481,20 +525,26 @@ let DebugSession = class DebugSession {
|
|
|
481
525
|
}
|
|
482
526
|
customRequest(request, args) {
|
|
483
527
|
if (!this.raw) {
|
|
484
|
-
throw new Error(
|
|
528
|
+
throw ( (new Error(
|
|
529
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", request)
|
|
530
|
+
)));
|
|
485
531
|
}
|
|
486
532
|
return this.raw.custom(request, args);
|
|
487
533
|
}
|
|
488
534
|
stackTrace(threadId, startFrame, levels, token) {
|
|
489
535
|
if (!this.raw) {
|
|
490
|
-
throw new Error(
|
|
536
|
+
throw ( (new Error(
|
|
537
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'stackTrace')
|
|
538
|
+
)));
|
|
491
539
|
}
|
|
492
540
|
const sessionToken = this.getNewCancellationToken(threadId, token);
|
|
493
541
|
return this.raw.stackTrace({ threadId, startFrame, levels }, sessionToken);
|
|
494
542
|
}
|
|
495
543
|
async exceptionInfo(threadId) {
|
|
496
544
|
if (!this.raw) {
|
|
497
|
-
throw new Error(
|
|
545
|
+
throw ( (new Error(
|
|
546
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'exceptionInfo')
|
|
547
|
+
)));
|
|
498
548
|
}
|
|
499
549
|
const response = await this.raw.exceptionInfo({ threadId });
|
|
500
550
|
if (response) {
|
|
@@ -509,28 +559,36 @@ let DebugSession = class DebugSession {
|
|
|
509
559
|
}
|
|
510
560
|
scopes(frameId, threadId) {
|
|
511
561
|
if (!this.raw) {
|
|
512
|
-
throw new Error(
|
|
562
|
+
throw ( (new Error(
|
|
563
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'scopes')
|
|
564
|
+
)));
|
|
513
565
|
}
|
|
514
566
|
const token = this.getNewCancellationToken(threadId);
|
|
515
567
|
return this.raw.scopes({ frameId }, token);
|
|
516
568
|
}
|
|
517
569
|
variables(variablesReference, threadId, filter, start, count) {
|
|
518
570
|
if (!this.raw) {
|
|
519
|
-
throw new Error(
|
|
571
|
+
throw ( (new Error(
|
|
572
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'variables')
|
|
573
|
+
)));
|
|
520
574
|
}
|
|
521
575
|
const token = threadId ? this.getNewCancellationToken(threadId) : undefined;
|
|
522
576
|
return this.raw.variables({ variablesReference, filter, start, count }, token);
|
|
523
577
|
}
|
|
524
578
|
evaluate(expression, frameId, context) {
|
|
525
579
|
if (!this.raw) {
|
|
526
|
-
throw new Error(
|
|
580
|
+
throw ( (new Error(
|
|
581
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'evaluate')
|
|
582
|
+
)));
|
|
527
583
|
}
|
|
528
584
|
return this.raw.evaluate({ expression, frameId, context });
|
|
529
585
|
}
|
|
530
586
|
async restartFrame(frameId, threadId) {
|
|
531
587
|
await this.waitForTriggeredBreakpoints();
|
|
532
588
|
if (!this.raw) {
|
|
533
|
-
throw new Error(
|
|
589
|
+
throw ( (new Error(
|
|
590
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'restartFrame')
|
|
591
|
+
)));
|
|
534
592
|
}
|
|
535
593
|
await this.raw.restartFrame({ frameId }, threadId);
|
|
536
594
|
}
|
|
@@ -543,7 +601,9 @@ let DebugSession = class DebugSession {
|
|
|
543
601
|
async next(threadId, granularity) {
|
|
544
602
|
await this.waitForTriggeredBreakpoints();
|
|
545
603
|
if (!this.raw) {
|
|
546
|
-
throw new Error(
|
|
604
|
+
throw ( (new Error(
|
|
605
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'next')
|
|
606
|
+
)));
|
|
547
607
|
}
|
|
548
608
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
549
609
|
await this.raw.next({ threadId, granularity });
|
|
@@ -551,7 +611,9 @@ let DebugSession = class DebugSession {
|
|
|
551
611
|
async stepIn(threadId, targetId, granularity) {
|
|
552
612
|
await this.waitForTriggeredBreakpoints();
|
|
553
613
|
if (!this.raw) {
|
|
554
|
-
throw new Error(
|
|
614
|
+
throw ( (new Error(
|
|
615
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'stepIn')
|
|
616
|
+
)));
|
|
555
617
|
}
|
|
556
618
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
557
619
|
await this.raw.stepIn({ threadId, targetId, granularity });
|
|
@@ -559,7 +621,9 @@ let DebugSession = class DebugSession {
|
|
|
559
621
|
async stepOut(threadId, granularity) {
|
|
560
622
|
await this.waitForTriggeredBreakpoints();
|
|
561
623
|
if (!this.raw) {
|
|
562
|
-
throw new Error(
|
|
624
|
+
throw ( (new Error(
|
|
625
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'stepOut')
|
|
626
|
+
)));
|
|
563
627
|
}
|
|
564
628
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
565
629
|
await this.raw.stepOut({ threadId, granularity });
|
|
@@ -567,7 +631,9 @@ let DebugSession = class DebugSession {
|
|
|
567
631
|
async stepBack(threadId, granularity) {
|
|
568
632
|
await this.waitForTriggeredBreakpoints();
|
|
569
633
|
if (!this.raw) {
|
|
570
|
-
throw new Error(
|
|
634
|
+
throw ( (new Error(
|
|
635
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'stepBack')
|
|
636
|
+
)));
|
|
571
637
|
}
|
|
572
638
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
573
639
|
await this.raw.stepBack({ threadId, granularity });
|
|
@@ -575,61 +641,78 @@ let DebugSession = class DebugSession {
|
|
|
575
641
|
async continue(threadId) {
|
|
576
642
|
await this.waitForTriggeredBreakpoints();
|
|
577
643
|
if (!this.raw) {
|
|
578
|
-
throw new Error(
|
|
644
|
+
throw ( (new Error(
|
|
645
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'continue')
|
|
646
|
+
)));
|
|
579
647
|
}
|
|
580
648
|
await this.raw.continue({ threadId });
|
|
581
649
|
}
|
|
582
650
|
async reverseContinue(threadId) {
|
|
583
651
|
await this.waitForTriggeredBreakpoints();
|
|
584
652
|
if (!this.raw) {
|
|
585
|
-
throw new Error(localizeWithPath(
|
|
653
|
+
throw ( (new Error(localizeWithPath(
|
|
654
|
+
_moduleId,
|
|
655
|
+
0,
|
|
656
|
+
"No debugger available, can not send '{0}'",
|
|
657
|
+
'reverse continue'
|
|
658
|
+
))));
|
|
586
659
|
}
|
|
587
660
|
await this.raw.reverseContinue({ threadId });
|
|
588
661
|
}
|
|
589
662
|
async pause(threadId) {
|
|
590
663
|
if (!this.raw) {
|
|
591
|
-
throw new Error(
|
|
664
|
+
throw ( (new Error(
|
|
665
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'pause')
|
|
666
|
+
)));
|
|
592
667
|
}
|
|
593
668
|
await this.raw.pause({ threadId });
|
|
594
669
|
}
|
|
595
670
|
async terminateThreads(threadIds) {
|
|
596
671
|
if (!this.raw) {
|
|
597
|
-
throw new Error(localizeWithPath(
|
|
672
|
+
throw ( (new Error(localizeWithPath(
|
|
673
|
+
_moduleId,
|
|
674
|
+
0,
|
|
675
|
+
"No debugger available, can not send '{0}'",
|
|
676
|
+
'terminateThreads'
|
|
677
|
+
))));
|
|
598
678
|
}
|
|
599
679
|
await this.raw.terminateThreads({ threadIds });
|
|
600
680
|
}
|
|
601
681
|
setVariable(variablesReference, name, value) {
|
|
602
682
|
if (!this.raw) {
|
|
603
|
-
throw new Error(
|
|
683
|
+
throw ( (new Error(
|
|
684
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'setVariable')
|
|
685
|
+
)));
|
|
604
686
|
}
|
|
605
687
|
return this.raw.setVariable({ variablesReference, name, value });
|
|
606
688
|
}
|
|
607
689
|
setExpression(frameId, expression, value) {
|
|
608
690
|
if (!this.raw) {
|
|
609
|
-
throw new Error(
|
|
691
|
+
throw ( (new Error(
|
|
692
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'setExpression')
|
|
693
|
+
)));
|
|
610
694
|
}
|
|
611
695
|
return this.raw.setExpression({ expression, value, frameId });
|
|
612
696
|
}
|
|
613
697
|
gotoTargets(source, line, column) {
|
|
614
698
|
if (!this.raw) {
|
|
615
|
-
throw new Error(
|
|
699
|
+
throw ( (new Error(
|
|
700
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'gotoTargets')
|
|
701
|
+
)));
|
|
616
702
|
}
|
|
617
703
|
return this.raw.gotoTargets({ source, line, column });
|
|
618
704
|
}
|
|
619
705
|
goto(threadId, targetId) {
|
|
620
706
|
if (!this.raw) {
|
|
621
|
-
throw new Error(
|
|
707
|
+
throw ( (new Error(
|
|
708
|
+
localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'goto')
|
|
709
|
+
)));
|
|
622
710
|
}
|
|
623
711
|
return this.raw.goto({ threadId, targetId });
|
|
624
712
|
}
|
|
625
713
|
loadSource(resource) {
|
|
626
714
|
if (!this.raw) {
|
|
627
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
628
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
629
|
-
'noDebugAdapter',
|
|
630
|
-
"No debugger available, can not send '{0}'",
|
|
631
|
-
'loadSource'
|
|
632
|
-
)))));
|
|
715
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'loadSource'))))));
|
|
633
716
|
}
|
|
634
717
|
const source = this.getSourceForUri(resource);
|
|
635
718
|
let rawSource;
|
|
@@ -644,16 +727,18 @@ let DebugSession = class DebugSession {
|
|
|
644
727
|
}
|
|
645
728
|
async getLoadedSources() {
|
|
646
729
|
if (!this.raw) {
|
|
647
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
648
|
-
|
|
649
|
-
|
|
730
|
+
return Promise.reject(( (new Error(( localizeWithPath(
|
|
731
|
+
_moduleId,
|
|
732
|
+
0,
|
|
650
733
|
"No debugger available, can not send '{0}'",
|
|
651
734
|
'getLoadedSources'
|
|
652
|
-
)))));
|
|
735
|
+
))))));
|
|
653
736
|
}
|
|
654
737
|
const response = await this.raw.loadedSources({});
|
|
655
738
|
if (response?.body && response.body.sources) {
|
|
656
|
-
return (
|
|
739
|
+
return (
|
|
740
|
+
(response.body.sources.map(src => this.getSource(src)))
|
|
741
|
+
);
|
|
657
742
|
}
|
|
658
743
|
else {
|
|
659
744
|
return [];
|
|
@@ -661,12 +746,7 @@ let DebugSession = class DebugSession {
|
|
|
661
746
|
}
|
|
662
747
|
async completions(frameId, threadId, text, position, overwriteBefore, token) {
|
|
663
748
|
if (!this.raw) {
|
|
664
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
665
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
666
|
-
'noDebugAdapter',
|
|
667
|
-
"No debugger available, can not send '{0}'",
|
|
668
|
-
'completions'
|
|
669
|
-
)))));
|
|
749
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'completions'))))));
|
|
670
750
|
}
|
|
671
751
|
const sessionCancelationToken = this.getNewCancellationToken(threadId, token);
|
|
672
752
|
return this.raw.completions({
|
|
@@ -678,58 +758,33 @@ let DebugSession = class DebugSession {
|
|
|
678
758
|
}
|
|
679
759
|
async stepInTargets(frameId) {
|
|
680
760
|
if (!this.raw) {
|
|
681
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
682
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
683
|
-
'noDebugAdapter',
|
|
684
|
-
"No debugger available, can not send '{0}'",
|
|
685
|
-
'stepInTargets'
|
|
686
|
-
)))));
|
|
761
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'stepInTargets'))))));
|
|
687
762
|
}
|
|
688
763
|
const response = await this.raw.stepInTargets({ frameId });
|
|
689
764
|
return response?.body.targets;
|
|
690
765
|
}
|
|
691
766
|
async cancel(progressId) {
|
|
692
767
|
if (!this.raw) {
|
|
693
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
694
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
695
|
-
'noDebugAdapter',
|
|
696
|
-
"No debugger available, can not send '{0}'",
|
|
697
|
-
'cancel'
|
|
698
|
-
)))));
|
|
768
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'cancel'))))));
|
|
699
769
|
}
|
|
700
770
|
return this.raw.cancel({ progressId });
|
|
701
771
|
}
|
|
702
772
|
async disassemble(memoryReference, offset, instructionOffset, instructionCount) {
|
|
703
773
|
if (!this.raw) {
|
|
704
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
705
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
706
|
-
'noDebugAdapter',
|
|
707
|
-
"No debugger available, can not send '{0}'",
|
|
708
|
-
'disassemble'
|
|
709
|
-
)))));
|
|
774
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'disassemble'))))));
|
|
710
775
|
}
|
|
711
776
|
const response = await this.raw.disassemble({ memoryReference, offset, instructionOffset, instructionCount, resolveSymbols: true });
|
|
712
777
|
return response?.body?.instructions;
|
|
713
778
|
}
|
|
714
779
|
readMemory(memoryReference, offset, count) {
|
|
715
780
|
if (!this.raw) {
|
|
716
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
717
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
718
|
-
'noDebugAdapter',
|
|
719
|
-
"No debugger available, can not send '{0}'",
|
|
720
|
-
'readMemory'
|
|
721
|
-
)))));
|
|
781
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'readMemory'))))));
|
|
722
782
|
}
|
|
723
783
|
return this.raw.readMemory({ count, memoryReference, offset });
|
|
724
784
|
}
|
|
725
785
|
writeMemory(memoryReference, offset, data, allowPartial) {
|
|
726
786
|
if (!this.raw) {
|
|
727
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
728
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
729
|
-
'noDebugAdapter',
|
|
730
|
-
"No debugger available, can not send '{0}'",
|
|
731
|
-
'disassemble'
|
|
732
|
-
)))));
|
|
787
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debugger available, can not send '{0}'", 'disassemble'))))));
|
|
733
788
|
}
|
|
734
789
|
return this.raw.writeMemory({ memoryReference, offset, allowPartial, data });
|
|
735
790
|
}
|
|
@@ -778,8 +833,8 @@ let DebugSession = class DebugSession {
|
|
|
778
833
|
this.threadIds = [];
|
|
779
834
|
data.threads.forEach(thread => {
|
|
780
835
|
this.threadIds.push(thread.id);
|
|
781
|
-
if (!( this.threads.has(thread.id))) {
|
|
782
|
-
this.threads.set(thread.id, ( new Thread(this, thread.name, thread.id)));
|
|
836
|
+
if (!( (this.threads.has(thread.id)))) {
|
|
837
|
+
this.threads.set(thread.id, ( (new Thread(this, thread.name, thread.id))));
|
|
783
838
|
}
|
|
784
839
|
else if (thread.name) {
|
|
785
840
|
const oldThread = this.threads.get(thread.id);
|
|
@@ -840,16 +895,8 @@ let DebugSession = class DebugSession {
|
|
|
840
895
|
}
|
|
841
896
|
this.rawListeners.add(this.raw.onDidInitialize(async () => {
|
|
842
897
|
status(this.configuration.noDebug
|
|
843
|
-
? ( localizeWithPath(
|
|
844
|
-
|
|
845
|
-
'debuggingStartedNoDebug',
|
|
846
|
-
"Started running without debugging."
|
|
847
|
-
))
|
|
848
|
-
: ( localizeWithPath(
|
|
849
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
850
|
-
'debuggingStarted',
|
|
851
|
-
"Debugging started."
|
|
852
|
-
)));
|
|
898
|
+
? ( localizeWithPath(_moduleId, 3, "Started running without debugging."))
|
|
899
|
+
: ( localizeWithPath(_moduleId, 4, "Debugging started.")));
|
|
853
900
|
const sendConfigurationDone = async () => {
|
|
854
901
|
if (this.raw && this.raw.capabilities.supportsConfigurationDoneRequest) {
|
|
855
902
|
try {
|
|
@@ -876,9 +923,9 @@ let DebugSession = class DebugSession {
|
|
|
876
923
|
statusQueue.cancel([event.body.threadId]);
|
|
877
924
|
if (event.body.reason === 'started') {
|
|
878
925
|
if (!this.fetchThreadsScheduler) {
|
|
879
|
-
this.fetchThreadsScheduler = ( new RunOnceScheduler(() => {
|
|
926
|
+
this.fetchThreadsScheduler = ( (new RunOnceScheduler(() => {
|
|
880
927
|
this.fetchThreads();
|
|
881
|
-
}, 100));
|
|
928
|
+
}, 100)));
|
|
882
929
|
this.rawListeners.add(this.fetchThreadsScheduler);
|
|
883
930
|
}
|
|
884
931
|
if (!this.fetchThreadsScheduler.isScheduled()) {
|
|
@@ -896,11 +943,7 @@ let DebugSession = class DebugSession {
|
|
|
896
943
|
}
|
|
897
944
|
}));
|
|
898
945
|
this.rawListeners.add(this.raw.onDidTerminateDebugee(async (event) => {
|
|
899
|
-
status(( localizeWithPath(
|
|
900
|
-
'vs/workbench/contrib/debug/browser/debugSession',
|
|
901
|
-
'debuggingStopped',
|
|
902
|
-
"Debugging stopped."
|
|
903
|
-
)));
|
|
946
|
+
status(( localizeWithPath(_moduleId, 5, "Debugging stopped.")));
|
|
904
947
|
if (event.body && event.body.restart) {
|
|
905
948
|
await this.debugService.restartSession(this, event.body.restart);
|
|
906
949
|
}
|
|
@@ -927,7 +970,7 @@ let DebugSession = class DebugSession {
|
|
|
927
970
|
this.model.clearThreads(this.getId(), false, threadId);
|
|
928
971
|
this._onDidChangeState.fire();
|
|
929
972
|
}));
|
|
930
|
-
const outputQueue = ( new Queue());
|
|
973
|
+
const outputQueue = ( (new Queue()));
|
|
931
974
|
this.rawListeners.add(this.raw.onDidOutput(async (event) => {
|
|
932
975
|
const outputSeverity = event.body.category === 'stderr' ? Severity$1.Error : event.body.category === 'console' ? Severity$1.Warning : Severity$1.Info;
|
|
933
976
|
if (event.body.variablesReference) {
|
|
@@ -936,7 +979,7 @@ let DebugSession = class DebugSession {
|
|
|
936
979
|
column: event.body.column ? event.body.column : 1,
|
|
937
980
|
source: this.getSource(event.body.source)
|
|
938
981
|
} : undefined;
|
|
939
|
-
const container = ( new ExpressionContainer(this, undefined, event.body.variablesReference, generateUuid()));
|
|
982
|
+
const container = ( (new ExpressionContainer(this, undefined, event.body.variablesReference, generateUuid())));
|
|
940
983
|
const children = container.getChildren();
|
|
941
984
|
outputQueue.queue(async () => {
|
|
942
985
|
const resolved = await children;
|
|
@@ -1001,7 +1044,7 @@ let DebugSession = class DebugSession {
|
|
|
1001
1044
|
lineNumber: event.body.breakpoint.line,
|
|
1002
1045
|
}], false);
|
|
1003
1046
|
if (bps.length === 1) {
|
|
1004
|
-
const data = ( new Map([[bps[0].getId(), event.body.breakpoint]]));
|
|
1047
|
+
const data = ( (new Map([[bps[0].getId(), event.body.breakpoint]])));
|
|
1005
1048
|
this.model.setBreakpointSessionData(this.getId(), this.capabilities, data);
|
|
1006
1049
|
}
|
|
1007
1050
|
}
|
|
@@ -1021,19 +1064,19 @@ let DebugSession = class DebugSession {
|
|
|
1021
1064
|
if (!breakpoint.column) {
|
|
1022
1065
|
event.body.breakpoint.column = undefined;
|
|
1023
1066
|
}
|
|
1024
|
-
const data = ( new Map([[breakpoint.getId(), event.body.breakpoint]]));
|
|
1067
|
+
const data = ( (new Map([[breakpoint.getId(), event.body.breakpoint]])));
|
|
1025
1068
|
this.model.setBreakpointSessionData(this.getId(), this.capabilities, data);
|
|
1026
1069
|
}
|
|
1027
1070
|
if (functionBreakpoint) {
|
|
1028
|
-
const data = ( new Map([[functionBreakpoint.getId(), event.body.breakpoint]]));
|
|
1071
|
+
const data = ( (new Map([[functionBreakpoint.getId(), event.body.breakpoint]])));
|
|
1029
1072
|
this.model.setBreakpointSessionData(this.getId(), this.capabilities, data);
|
|
1030
1073
|
}
|
|
1031
1074
|
if (dataBreakpoint) {
|
|
1032
|
-
const data = ( new Map([[dataBreakpoint.getId(), event.body.breakpoint]]));
|
|
1075
|
+
const data = ( (new Map([[dataBreakpoint.getId(), event.body.breakpoint]])));
|
|
1033
1076
|
this.model.setBreakpointSessionData(this.getId(), this.capabilities, data);
|
|
1034
1077
|
}
|
|
1035
1078
|
if (exceptionBreakpoint) {
|
|
1036
|
-
const data = ( new Map([[exceptionBreakpoint.getId(), event.body.breakpoint]]));
|
|
1079
|
+
const data = ( (new Map([[exceptionBreakpoint.getId(), event.body.breakpoint]])));
|
|
1037
1080
|
this.model.setBreakpointSessionData(this.getId(), this.capabilities, data);
|
|
1038
1081
|
}
|
|
1039
1082
|
}
|
|
@@ -1066,7 +1109,7 @@ let DebugSession = class DebugSession {
|
|
|
1066
1109
|
this.model.clearThreads(this.getId(), true);
|
|
1067
1110
|
const details = this.stoppedDetails;
|
|
1068
1111
|
this.stoppedDetails.length = 1;
|
|
1069
|
-
await Promise.all(( details.map(d => this.handleStop(d))));
|
|
1112
|
+
await Promise.all(( (details.map(d => this.handleStop(d)))));
|
|
1070
1113
|
}
|
|
1071
1114
|
const viewModel = this.debugService.getViewModel();
|
|
1072
1115
|
if (viewModel.focusedSession === this) {
|
|
@@ -1084,7 +1127,7 @@ let DebugSession = class DebugSession {
|
|
|
1084
1127
|
this.statusQueue.run(this.fetchThreads(event).then(() => event.threadId === undefined ? this.threadIds : [event.threadId]), async (threadId, token) => {
|
|
1085
1128
|
const hasLotsOfThreads = event.threadId === undefined && this.threadIds.length > 10;
|
|
1086
1129
|
const focusedThread = this.debugService.getViewModel().focusedThread;
|
|
1087
|
-
const focusedThreadDoesNotExist = focusedThread !== undefined && focusedThread.session === this && !( this.threads.has(focusedThread.threadId));
|
|
1130
|
+
const focusedThreadDoesNotExist = focusedThread !== undefined && focusedThread.session === this && !( (this.threads.has(focusedThread.threadId)));
|
|
1088
1131
|
if (focusedThreadDoesNotExist) {
|
|
1089
1132
|
this.debugService.focusStackFrame(undefined, undefined);
|
|
1090
1133
|
}
|
|
@@ -1146,17 +1189,17 @@ let DebugSession = class DebugSession {
|
|
|
1146
1189
|
}
|
|
1147
1190
|
breakpoints = this.getBreakpointsAtPosition(frame.source.uri, frame.range.startLineNumber, frame.range.endLineNumber, frame.range.startColumn, frame.range.endColumn);
|
|
1148
1191
|
}
|
|
1149
|
-
const urisToResend = ( new Set());
|
|
1192
|
+
const urisToResend = ( (new Set()));
|
|
1150
1193
|
this.model.getBreakpoints({ triggeredOnly: true, enabledOnly: true }).forEach(bp => {
|
|
1151
1194
|
breakpoints.forEach(cbp => {
|
|
1152
1195
|
if (bp.enabled && bp.triggeredBy === cbp.getId()) {
|
|
1153
1196
|
bp.setSessionDidTrigger(this.getId());
|
|
1154
|
-
urisToResend.add(( bp.uri.toString()));
|
|
1197
|
+
urisToResend.add(( (bp.uri.toString())));
|
|
1155
1198
|
}
|
|
1156
1199
|
});
|
|
1157
1200
|
});
|
|
1158
1201
|
const results = [];
|
|
1159
|
-
urisToResend.forEach((uri) => results.push(this.debugService.sendBreakpoints(( URI.parse(uri)), undefined, this)));
|
|
1202
|
+
urisToResend.forEach((uri) => results.push(this.debugService.sendBreakpoints(( (URI.parse(uri))), undefined, this)));
|
|
1160
1203
|
return Promise.all(results);
|
|
1161
1204
|
}
|
|
1162
1205
|
getBreakpointsAtPosition(uri, startLineNumber, endLineNumber, startColumn, endColumn) {
|
|
@@ -1196,11 +1239,11 @@ let DebugSession = class DebugSession {
|
|
|
1196
1239
|
this.globalDisposables.dispose();
|
|
1197
1240
|
}
|
|
1198
1241
|
getSourceForUri(uri) {
|
|
1199
|
-
return this.sources.get(( this.uriIdentityService.asCanonicalUri(uri).toString()));
|
|
1242
|
+
return this.sources.get(( (this.uriIdentityService.asCanonicalUri(uri).toString())));
|
|
1200
1243
|
}
|
|
1201
1244
|
getSource(raw) {
|
|
1202
|
-
let source = ( new Source(raw, this.getId(), this.uriIdentityService, this.logService));
|
|
1203
|
-
const uriKey = ( source.uri.toString());
|
|
1245
|
+
let source = ( (new Source(raw, this.getId(), this.uriIdentityService, this.logService)));
|
|
1246
|
+
const uriKey = ( (source.uri.toString()));
|
|
1204
1247
|
const found = this.sources.get(uriKey);
|
|
1205
1248
|
if (found) {
|
|
1206
1249
|
source = found;
|
|
@@ -1225,7 +1268,7 @@ let DebugSession = class DebugSession {
|
|
|
1225
1268
|
}
|
|
1226
1269
|
}
|
|
1227
1270
|
getNewCancellationToken(threadId, token) {
|
|
1228
|
-
const tokenSource = ( new CancellationTokenSource(token));
|
|
1271
|
+
const tokenSource = ( (new CancellationTokenSource(token)));
|
|
1229
1272
|
const tokens = this.cancellationMap.get(threadId) || [];
|
|
1230
1273
|
tokens.push(tokenSource);
|
|
1231
1274
|
this.cancellationMap.set(threadId, tokens);
|
|
@@ -1251,34 +1294,34 @@ let DebugSession = class DebugSession {
|
|
|
1251
1294
|
appendToRepl(data, isImportant) {
|
|
1252
1295
|
this.repl.appendToRepl(this, data);
|
|
1253
1296
|
if (isImportant) {
|
|
1254
|
-
this.notificationService.notify({ message: ( data.output.toString()), severity: data.sev, source: this.name });
|
|
1297
|
+
this.notificationService.notify({ message: ( (data.output.toString())), severity: data.sev, source: this.name });
|
|
1255
1298
|
}
|
|
1256
1299
|
}
|
|
1257
1300
|
};
|
|
1258
|
-
DebugSession = ( __decorate([
|
|
1259
|
-
( __param(5, IDebugService)),
|
|
1260
|
-
( __param(6, ITelemetryService)),
|
|
1261
|
-
( __param(7, IHostService)),
|
|
1262
|
-
( __param(8, IConfigurationService)),
|
|
1263
|
-
( __param(9, IPaneCompositePartService)),
|
|
1264
|
-
( __param(10, IWorkspaceContextService)),
|
|
1265
|
-
( __param(11, IProductService)),
|
|
1266
|
-
( __param(12, INotificationService)),
|
|
1267
|
-
( __param(13, ILifecycleService)),
|
|
1268
|
-
( __param(14, IUriIdentityService)),
|
|
1269
|
-
( __param(15, IInstantiationService)),
|
|
1270
|
-
( __param(16, ICustomEndpointTelemetryService)),
|
|
1271
|
-
( __param(17, IWorkbenchEnvironmentService)),
|
|
1272
|
-
( __param(18, ILogService))
|
|
1273
|
-
], DebugSession));
|
|
1301
|
+
DebugSession = ( (__decorate([
|
|
1302
|
+
( (__param(5, IDebugService))),
|
|
1303
|
+
( (__param(6, ITelemetryService))),
|
|
1304
|
+
( (__param(7, IHostService))),
|
|
1305
|
+
( (__param(8, IConfigurationService))),
|
|
1306
|
+
( (__param(9, IPaneCompositePartService))),
|
|
1307
|
+
( (__param(10, IWorkspaceContextService))),
|
|
1308
|
+
( (__param(11, IProductService))),
|
|
1309
|
+
( (__param(12, INotificationService))),
|
|
1310
|
+
( (__param(13, ILifecycleService))),
|
|
1311
|
+
( (__param(14, IUriIdentityService))),
|
|
1312
|
+
( (__param(15, IInstantiationService))),
|
|
1313
|
+
( (__param(16, ICustomEndpointTelemetryService))),
|
|
1314
|
+
( (__param(17, IWorkbenchEnvironmentService))),
|
|
1315
|
+
( (__param(18, ILogService)))
|
|
1316
|
+
], DebugSession)));
|
|
1274
1317
|
class ThreadStatusScheduler extends Disposable {
|
|
1275
1318
|
constructor() {
|
|
1276
1319
|
super(...arguments);
|
|
1277
1320
|
this.pendingCancellations = [];
|
|
1278
|
-
this.threadOps = this._register(( new DisposableMap()));
|
|
1321
|
+
this.threadOps = this._register(( (new DisposableMap())));
|
|
1279
1322
|
}
|
|
1280
1323
|
async run(threadIdsP, operation) {
|
|
1281
|
-
const cancelledWhileLookingUpThreads = ( new Set());
|
|
1324
|
+
const cancelledWhileLookingUpThreads = ( (new Set()));
|
|
1282
1325
|
this.pendingCancellations.push(cancelledWhileLookingUpThreads);
|
|
1283
1326
|
const threadIds = await threadIdsP;
|
|
1284
1327
|
for (let i = 0; i < this.pendingCancellations.length; i++) {
|
|
@@ -1293,18 +1336,18 @@ class ThreadStatusScheduler extends Disposable {
|
|
|
1293
1336
|
}
|
|
1294
1337
|
}
|
|
1295
1338
|
}
|
|
1296
|
-
if (( cancelledWhileLookingUpThreads.has(undefined))) {
|
|
1339
|
+
if (( (cancelledWhileLookingUpThreads.has(undefined)))) {
|
|
1297
1340
|
return;
|
|
1298
1341
|
}
|
|
1299
|
-
await Promise.all(( threadIds.map(threadId => {
|
|
1300
|
-
if (( cancelledWhileLookingUpThreads.has(threadId))) {
|
|
1342
|
+
await Promise.all(( (threadIds.map(threadId => {
|
|
1343
|
+
if (( (cancelledWhileLookingUpThreads.has(threadId)))) {
|
|
1301
1344
|
return;
|
|
1302
1345
|
}
|
|
1303
1346
|
this.threadOps.get(threadId)?.cancel();
|
|
1304
|
-
const cts = ( new CancellationTokenSource());
|
|
1347
|
+
const cts = ( (new CancellationTokenSource()));
|
|
1305
1348
|
this.threadOps.set(threadId, cts);
|
|
1306
1349
|
return operation(threadId, cts.token);
|
|
1307
|
-
})));
|
|
1350
|
+
}))));
|
|
1308
1351
|
}
|
|
1309
1352
|
cancel(threadIds) {
|
|
1310
1353
|
if (!threadIds) {
|