@codingame/monaco-vscode-debug-service-override 25.1.2 → 26.0.1
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/package.json +2 -2
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +41 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +379 -255
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +606 -325
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +132 -91
- package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +105 -103
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +258 -147
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +163 -121
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +92 -41
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +68 -39
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +290 -214
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +409 -260
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +14 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +19 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +126 -100
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +160 -89
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +87 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +270 -181
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +79 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +149 -113
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css +24 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +201 -189
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +28 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +10 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +66 -86
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +24 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +177 -138
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +55 -33
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +8 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +23 -19
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +9 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +156 -133
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +81 -52
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +22 -14
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +46 -30
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +74 -52
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +7 -7
|
@@ -47,7 +47,30 @@ import { RawDebugSession } from './rawDebugSession.js';
|
|
|
47
47
|
|
|
48
48
|
const TRIGGERED_BREAKPOINT_MAX_DELAY = 1500;
|
|
49
49
|
let DebugSession = class DebugSession {
|
|
50
|
-
constructor(
|
|
50
|
+
constructor(
|
|
51
|
+
id,
|
|
52
|
+
_configuration,
|
|
53
|
+
root,
|
|
54
|
+
model,
|
|
55
|
+
options,
|
|
56
|
+
debugService,
|
|
57
|
+
telemetryService,
|
|
58
|
+
hostService,
|
|
59
|
+
configurationService,
|
|
60
|
+
paneCompositeService,
|
|
61
|
+
workspaceContextService,
|
|
62
|
+
productService,
|
|
63
|
+
notificationService,
|
|
64
|
+
lifecycleService,
|
|
65
|
+
uriIdentityService,
|
|
66
|
+
instantiationService,
|
|
67
|
+
customEndpointTelemetryService,
|
|
68
|
+
workbenchEnvironmentService,
|
|
69
|
+
logService,
|
|
70
|
+
testService,
|
|
71
|
+
testResultService,
|
|
72
|
+
accessibilityService
|
|
73
|
+
) {
|
|
51
74
|
this.id = id;
|
|
52
75
|
this._configuration = _configuration;
|
|
53
76
|
this.root = root;
|
|
@@ -97,22 +120,19 @@ let DebugSession = class DebugSession {
|
|
|
97
120
|
this.parentSession = this._options.parentSession;
|
|
98
121
|
if (this.hasSeparateRepl()) {
|
|
99
122
|
this.repl = ( new ReplModel(this.configurationService));
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
123
|
+
} else {
|
|
102
124
|
this.repl = this.parentSession.repl;
|
|
103
125
|
}
|
|
104
126
|
const toDispose = this.globalDisposables;
|
|
105
127
|
const replListener = toDispose.add(( new MutableDisposable()));
|
|
106
|
-
replListener.value = this.repl.onDidChangeElements(
|
|
128
|
+
replListener.value = this.repl.onDidChangeElements(e => this._onDidChangeREPLElements.fire(e));
|
|
107
129
|
if (lifecycleService) {
|
|
108
130
|
toDispose.add(lifecycleService.onWillShutdown(() => {
|
|
109
131
|
this.shutdown();
|
|
110
132
|
dispose(toDispose);
|
|
111
133
|
}));
|
|
112
134
|
}
|
|
113
|
-
this.correlatedTestRun = options?.testRun
|
|
114
|
-
? testResultService.getResult(options.testRun.runId)
|
|
115
|
-
: this.parentSession?.correlatedTestRun;
|
|
135
|
+
this.correlatedTestRun = options?.testRun ? testResultService.getResult(options.testRun.runId) : this.parentSession?.correlatedTestRun;
|
|
116
136
|
if (this.correlatedTestRun) {
|
|
117
137
|
toDispose.add(this.correlatedTestRun.onComplete(() => this.terminate()));
|
|
118
138
|
}
|
|
@@ -122,15 +142,14 @@ let DebugSession = class DebugSession {
|
|
|
122
142
|
}
|
|
123
143
|
this.passFocusScheduler = ( new RunOnceScheduler(() => {
|
|
124
144
|
if (( this.debugService.getModel().getSessions().some(s => s.state === State.Stopped)) || ( this.getAllThreads().some(t => t.stopped))) {
|
|
125
|
-
if (typeof this.lastContinuedThreadId ===
|
|
145
|
+
if (typeof this.lastContinuedThreadId === "number") {
|
|
126
146
|
const thread = this.debugService.getViewModel().focusedThread;
|
|
127
147
|
if (thread && thread.threadId === this.lastContinuedThreadId && !thread.stopped) {
|
|
128
148
|
const toFocusThreadId = this.getStoppedDetails()?.threadId;
|
|
129
|
-
const toFocusThread = typeof toFocusThreadId ===
|
|
149
|
+
const toFocusThread = typeof toFocusThreadId === "number" ? this.getThread(toFocusThreadId) : undefined;
|
|
130
150
|
this.debugService.focusStackFrame(undefined, toFocusThread);
|
|
131
151
|
}
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
152
|
+
} else {
|
|
134
153
|
const session = this.debugService.getViewModel().focusedSession;
|
|
135
154
|
if (session && session.getId() === this.getId() && session.state !== State.Stopped) {
|
|
136
155
|
this.debugService.focusStackFrame(undefined);
|
|
@@ -143,7 +162,7 @@ let DebugSession = class DebugSession {
|
|
|
143
162
|
toDispose.add(parent.onDidEndAdapter(() => {
|
|
144
163
|
if (!this.hasSeparateRepl() && this.raw?.isInShutdown === false) {
|
|
145
164
|
this.repl = this.repl.clone();
|
|
146
|
-
replListener.value = this.repl.onDidChangeElements(
|
|
165
|
+
replListener.value = this.repl.onDidChangeElements(e => this._onDidChangeREPLElements.fire(e));
|
|
147
166
|
this.parentSession = undefined;
|
|
148
167
|
}
|
|
149
168
|
}));
|
|
@@ -190,8 +209,8 @@ let DebugSession = class DebugSession {
|
|
|
190
209
|
}
|
|
191
210
|
get autoExpandLazyVariables() {
|
|
192
211
|
const screenReaderOptimized = this.accessibilityService.isScreenReaderOptimized();
|
|
193
|
-
const value = this.configurationService.getValue(
|
|
194
|
-
return value ===
|
|
212
|
+
const value = this.configurationService.getValue("debug").autoExpandLazyVariables;
|
|
213
|
+
return value === "auto" && screenReaderOptimized || value === "on";
|
|
195
214
|
}
|
|
196
215
|
setConfiguration(configuration) {
|
|
197
216
|
this._configuration = configuration;
|
|
@@ -266,10 +285,10 @@ let DebugSession = class DebugSession {
|
|
|
266
285
|
await this.raw.start();
|
|
267
286
|
this.registerListeners();
|
|
268
287
|
await this.raw.initialize({
|
|
269
|
-
clientID:
|
|
288
|
+
clientID: "vscode",
|
|
270
289
|
clientName: this.productService.nameLong,
|
|
271
290
|
adapterID: this.configuration.type,
|
|
272
|
-
pathFormat:
|
|
291
|
+
pathFormat: "path",
|
|
273
292
|
linesStartAt1: true,
|
|
274
293
|
columnsStartAt1: true,
|
|
275
294
|
supportsVariableType: true,
|
|
@@ -282,15 +301,14 @@ let DebugSession = class DebugSession {
|
|
|
282
301
|
supportsArgsCanBeInterpretedByShell: true,
|
|
283
302
|
supportsMemoryEvent: true,
|
|
284
303
|
supportsStartDebuggingRequest: true,
|
|
285
|
-
supportsANSIStyling: true
|
|
304
|
+
supportsANSIStyling: true
|
|
286
305
|
});
|
|
287
306
|
this.initialized = true;
|
|
288
307
|
this._onDidChangeState.fire();
|
|
289
308
|
this.rememberedCapabilities = this.raw.capabilities;
|
|
290
309
|
this.debugService.setExceptionBreakpointsForSession(this, (this.raw && this.raw.capabilities.exceptionBreakpointFilters) || []);
|
|
291
310
|
this.debugService.getModel().registerBreakpointModes(this.configuration.type, this.raw.capabilities.breakpointModes || []);
|
|
292
|
-
}
|
|
293
|
-
catch (err) {
|
|
311
|
+
} catch (err) {
|
|
294
312
|
this.initialized = true;
|
|
295
313
|
this._onDidChangeState.fire();
|
|
296
314
|
await this.shutdown();
|
|
@@ -299,7 +317,7 @@ let DebugSession = class DebugSession {
|
|
|
299
317
|
}
|
|
300
318
|
async launchOrAttach(config) {
|
|
301
319
|
if (!this.raw) {
|
|
302
|
-
throw ( new Error(( localize(
|
|
320
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "launch or attach"))));
|
|
303
321
|
}
|
|
304
322
|
if (this.parentSession && this.parentSession.state === State.Inactive) {
|
|
305
323
|
throw canceled();
|
|
@@ -307,8 +325,7 @@ let DebugSession = class DebugSession {
|
|
|
307
325
|
config.__sessionId = this.getId();
|
|
308
326
|
try {
|
|
309
327
|
await this.raw.launchOrAttach(config);
|
|
310
|
-
}
|
|
311
|
-
catch (err) {
|
|
328
|
+
} catch (err) {
|
|
312
329
|
this.shutdown();
|
|
313
330
|
throw err;
|
|
314
331
|
}
|
|
@@ -326,16 +343,16 @@ let DebugSession = class DebugSession {
|
|
|
326
343
|
this.cancelAllRequests();
|
|
327
344
|
if (this._options.lifecycleManagedByParent && this.parentSession) {
|
|
328
345
|
await this.parentSession.terminate(restart);
|
|
329
|
-
}
|
|
330
|
-
else if (this.correlatedTestRun && !this.correlatedTestRun.completedAt && !this.didTerminateTestRun) {
|
|
346
|
+
} else if (this.correlatedTestRun && !this.correlatedTestRun.completedAt && !this.didTerminateTestRun) {
|
|
331
347
|
this.cancelCorrelatedTestRun();
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
if (this.raw.capabilities.supportsTerminateRequest && this._configuration.resolved.request === 'launch') {
|
|
348
|
+
} else if (this.raw) {
|
|
349
|
+
if (this.raw.capabilities.supportsTerminateRequest && this._configuration.resolved.request === "launch") {
|
|
335
350
|
await this.raw.terminate(restart);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
351
|
+
} else {
|
|
352
|
+
await this.raw.disconnect({
|
|
353
|
+
restart,
|
|
354
|
+
terminateDebuggee: true
|
|
355
|
+
});
|
|
339
356
|
}
|
|
340
357
|
}
|
|
341
358
|
if (!restart) {
|
|
@@ -349,9 +366,12 @@ let DebugSession = class DebugSession {
|
|
|
349
366
|
this.cancelAllRequests();
|
|
350
367
|
if (this._options.lifecycleManagedByParent && this.parentSession) {
|
|
351
368
|
await this.parentSession.disconnect(restart, suspend);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
369
|
+
} else if (this.raw) {
|
|
370
|
+
await this.raw.disconnect({
|
|
371
|
+
restart,
|
|
372
|
+
terminateDebuggee: false,
|
|
373
|
+
suspendDebuggee: suspend
|
|
374
|
+
});
|
|
355
375
|
}
|
|
356
376
|
if (!restart) {
|
|
357
377
|
this._options.compoundRoot?.sessionStopped();
|
|
@@ -359,19 +379,20 @@ let DebugSession = class DebugSession {
|
|
|
359
379
|
}
|
|
360
380
|
async restart() {
|
|
361
381
|
if (!this.raw) {
|
|
362
|
-
throw ( new Error(( localize(
|
|
382
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "restart"))));
|
|
363
383
|
}
|
|
364
384
|
this.cancelAllRequests();
|
|
365
385
|
if (this._options.lifecycleManagedByParent && this.parentSession) {
|
|
366
386
|
await this.parentSession.restart();
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
|
|
387
|
+
} else {
|
|
388
|
+
await this.raw.restart({
|
|
389
|
+
arguments: this.configuration
|
|
390
|
+
});
|
|
370
391
|
}
|
|
371
392
|
}
|
|
372
393
|
async sendBreakpoints(modelUri, breakpointsToSend, sourceModified) {
|
|
373
394
|
if (!this.raw) {
|
|
374
|
-
throw ( new Error(( localize(
|
|
395
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "breakpoints"))));
|
|
375
396
|
}
|
|
376
397
|
if (!this.raw.readyForBreakpoints) {
|
|
377
398
|
return Promise.resolve(undefined);
|
|
@@ -399,10 +420,12 @@ let DebugSession = class DebugSession {
|
|
|
399
420
|
}
|
|
400
421
|
async sendFunctionBreakpoints(fbpts) {
|
|
401
422
|
if (!this.raw) {
|
|
402
|
-
throw ( new Error(( localize(
|
|
423
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "function breakpoints"))));
|
|
403
424
|
}
|
|
404
425
|
if (this.raw.readyForBreakpoints) {
|
|
405
|
-
const response = await this.raw.setFunctionBreakpoints({
|
|
426
|
+
const response = await this.raw.setFunctionBreakpoints({
|
|
427
|
+
breakpoints: ( fbpts.map(bp => bp.toDAP()))
|
|
428
|
+
});
|
|
406
429
|
if (response?.body) {
|
|
407
430
|
const data = ( new Map());
|
|
408
431
|
for (let i = 0; i < fbpts.length; i++) {
|
|
@@ -414,18 +437,25 @@ let DebugSession = class DebugSession {
|
|
|
414
437
|
}
|
|
415
438
|
async sendExceptionBreakpoints(exbpts) {
|
|
416
439
|
if (!this.raw) {
|
|
417
|
-
throw ( new Error(( localize(
|
|
440
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "exception breakpoints"))));
|
|
418
441
|
}
|
|
419
442
|
if (this.raw.readyForBreakpoints) {
|
|
420
443
|
const args = this.capabilities.supportsExceptionFilterOptions ? {
|
|
421
444
|
filters: [],
|
|
422
445
|
filterOptions: ( exbpts.map(exb => {
|
|
423
446
|
if (exb.condition) {
|
|
424
|
-
return {
|
|
447
|
+
return {
|
|
448
|
+
filterId: exb.filter,
|
|
449
|
+
condition: exb.condition
|
|
450
|
+
};
|
|
425
451
|
}
|
|
426
|
-
return {
|
|
452
|
+
return {
|
|
453
|
+
filterId: exb.filter
|
|
454
|
+
};
|
|
427
455
|
}))
|
|
428
|
-
} : {
|
|
456
|
+
} : {
|
|
457
|
+
filters: ( exbpts.map(exb => exb.filter))
|
|
458
|
+
};
|
|
429
459
|
const response = await this.raw.setExceptionBreakpoints(args);
|
|
430
460
|
if (response?.body && response.body.breakpoints) {
|
|
431
461
|
const data = ( new Map());
|
|
@@ -438,46 +468,60 @@ let DebugSession = class DebugSession {
|
|
|
438
468
|
}
|
|
439
469
|
dataBytesBreakpointInfo(address, bytes) {
|
|
440
470
|
if (this.raw?.capabilities.supportsDataBreakpointBytes === false) {
|
|
441
|
-
throw ( new Error(( localize(
|
|
471
|
+
throw ( new Error(( localize(7209, "Session does not support breakpoints with bytes"))));
|
|
442
472
|
}
|
|
443
|
-
return this._dataBreakpointInfo({
|
|
473
|
+
return this._dataBreakpointInfo({
|
|
474
|
+
name: address,
|
|
475
|
+
bytes,
|
|
476
|
+
asAddress: true
|
|
477
|
+
});
|
|
444
478
|
}
|
|
445
479
|
dataBreakpointInfo(name, variablesReference, frameId) {
|
|
446
|
-
return this._dataBreakpointInfo({
|
|
480
|
+
return this._dataBreakpointInfo({
|
|
481
|
+
name,
|
|
482
|
+
variablesReference,
|
|
483
|
+
frameId
|
|
484
|
+
});
|
|
447
485
|
}
|
|
448
486
|
async _dataBreakpointInfo(args) {
|
|
449
487
|
if (!this.raw) {
|
|
450
|
-
throw ( new Error(( localize(
|
|
488
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "data breakpoints info"))));
|
|
451
489
|
}
|
|
452
490
|
if (!this.raw.readyForBreakpoints) {
|
|
453
|
-
throw ( new Error(( localize(
|
|
491
|
+
throw ( new Error(( localize(7210, "Session is not ready for breakpoints"))));
|
|
454
492
|
}
|
|
455
493
|
const response = await this.raw.dataBreakpointInfo(args);
|
|
456
494
|
return response?.body;
|
|
457
495
|
}
|
|
458
496
|
async sendDataBreakpoints(dataBreakpoints) {
|
|
459
497
|
if (!this.raw) {
|
|
460
|
-
throw ( new Error(( localize(
|
|
498
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "data breakpoints"))));
|
|
461
499
|
}
|
|
462
500
|
if (this.raw.readyForBreakpoints) {
|
|
463
|
-
const converted = await Promise.all(( dataBreakpoints.map(async
|
|
501
|
+
const converted = await Promise.all(( dataBreakpoints.map(async bp => {
|
|
464
502
|
try {
|
|
465
503
|
const dap = await bp.toDAP(this);
|
|
466
|
-
return {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
504
|
+
return {
|
|
505
|
+
dap,
|
|
506
|
+
bp
|
|
507
|
+
};
|
|
508
|
+
} catch (e) {
|
|
509
|
+
return {
|
|
510
|
+
bp,
|
|
511
|
+
message: e.message
|
|
512
|
+
};
|
|
470
513
|
}
|
|
471
514
|
})));
|
|
472
|
-
const response = await this.raw.setDataBreakpoints({
|
|
515
|
+
const response = await this.raw.setDataBreakpoints({
|
|
516
|
+
breakpoints: ( converted.map(d => d.dap)).filter(isDefined)
|
|
517
|
+
});
|
|
473
518
|
if (response?.body) {
|
|
474
519
|
const data = ( new Map());
|
|
475
520
|
let i = 0;
|
|
476
521
|
for (const dap of converted) {
|
|
477
522
|
if (!dap.dap) {
|
|
478
523
|
data.set(dap.bp.getId(), dap.message);
|
|
479
|
-
}
|
|
480
|
-
else if (i < response.body.breakpoints.length) {
|
|
524
|
+
} else if (i < response.body.breakpoints.length) {
|
|
481
525
|
data.set(dap.bp.getId(), response.body.breakpoints[i++]);
|
|
482
526
|
}
|
|
483
527
|
}
|
|
@@ -488,13 +532,15 @@ let DebugSession = class DebugSession {
|
|
|
488
532
|
async sendInstructionBreakpoints(instructionBreakpoints) {
|
|
489
533
|
if (!this.raw) {
|
|
490
534
|
throw ( new Error(( localize(
|
|
491
|
-
|
|
535
|
+
7208,
|
|
492
536
|
"No debugger available, can not send '{0}'",
|
|
493
|
-
|
|
537
|
+
"instruction breakpoints"
|
|
494
538
|
))));
|
|
495
539
|
}
|
|
496
540
|
if (this.raw.readyForBreakpoints) {
|
|
497
|
-
const response = await this.raw.setInstructionBreakpoints({
|
|
541
|
+
const response = await this.raw.setInstructionBreakpoints({
|
|
542
|
+
breakpoints: ( instructionBreakpoints.map(ib => ib.toDAP()))
|
|
543
|
+
});
|
|
498
544
|
if (response?.body) {
|
|
499
545
|
const data = ( new Map());
|
|
500
546
|
for (let i = 0; i < instructionBreakpoints.length; i++) {
|
|
@@ -506,14 +552,20 @@ let DebugSession = class DebugSession {
|
|
|
506
552
|
}
|
|
507
553
|
async breakpointsLocations(uri, lineNumber) {
|
|
508
554
|
if (!this.raw) {
|
|
509
|
-
throw ( new Error(( localize(
|
|
555
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "breakpoints locations"))));
|
|
510
556
|
}
|
|
511
557
|
const source = this.getRawSource(uri);
|
|
512
|
-
const response = await this.raw.breakpointLocations({
|
|
558
|
+
const response = await this.raw.breakpointLocations({
|
|
559
|
+
source,
|
|
560
|
+
line: lineNumber
|
|
561
|
+
});
|
|
513
562
|
if (!response || !response.body || !response.body.breakpoints) {
|
|
514
563
|
return [];
|
|
515
564
|
}
|
|
516
|
-
const positions = ( response.body.breakpoints.map(bp => ({
|
|
565
|
+
const positions = ( response.body.breakpoints.map(bp => ({
|
|
566
|
+
lineNumber: bp.line,
|
|
567
|
+
column: bp.column || 1
|
|
568
|
+
})));
|
|
517
569
|
return distinct(positions, p => `${p.lineNumber}:${p.column}`);
|
|
518
570
|
}
|
|
519
571
|
getDebugProtocolBreakpoint(breakpointId) {
|
|
@@ -521,22 +573,28 @@ let DebugSession = class DebugSession {
|
|
|
521
573
|
}
|
|
522
574
|
customRequest(request, args) {
|
|
523
575
|
if (!this.raw) {
|
|
524
|
-
throw ( new Error(( localize(
|
|
576
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", request))));
|
|
525
577
|
}
|
|
526
578
|
return this.raw.custom(request, args);
|
|
527
579
|
}
|
|
528
580
|
stackTrace(threadId, startFrame, levels, token) {
|
|
529
581
|
if (!this.raw) {
|
|
530
|
-
throw ( new Error(( localize(
|
|
582
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "stackTrace"))));
|
|
531
583
|
}
|
|
532
584
|
const sessionToken = this.getNewCancellationToken(threadId, token);
|
|
533
|
-
return this.raw.stackTrace({
|
|
585
|
+
return this.raw.stackTrace({
|
|
586
|
+
threadId,
|
|
587
|
+
startFrame,
|
|
588
|
+
levels
|
|
589
|
+
}, sessionToken);
|
|
534
590
|
}
|
|
535
591
|
async exceptionInfo(threadId) {
|
|
536
592
|
if (!this.raw) {
|
|
537
|
-
throw ( new Error(( localize(
|
|
593
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "exceptionInfo"))));
|
|
538
594
|
}
|
|
539
|
-
const response = await this.raw.exceptionInfo({
|
|
595
|
+
const response = await this.raw.exceptionInfo({
|
|
596
|
+
threadId
|
|
597
|
+
});
|
|
540
598
|
if (response) {
|
|
541
599
|
return {
|
|
542
600
|
id: response.body.exceptionId,
|
|
@@ -549,30 +607,46 @@ let DebugSession = class DebugSession {
|
|
|
549
607
|
}
|
|
550
608
|
scopes(frameId, threadId) {
|
|
551
609
|
if (!this.raw) {
|
|
552
|
-
throw ( new Error(( localize(
|
|
610
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "scopes"))));
|
|
553
611
|
}
|
|
554
612
|
const token = this.getNewCancellationToken(threadId);
|
|
555
|
-
return this.raw.scopes({
|
|
613
|
+
return this.raw.scopes({
|
|
614
|
+
frameId
|
|
615
|
+
}, token);
|
|
556
616
|
}
|
|
557
617
|
variables(variablesReference, threadId, filter, start, count) {
|
|
558
618
|
if (!this.raw) {
|
|
559
|
-
throw ( new Error(( localize(
|
|
619
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "variables"))));
|
|
560
620
|
}
|
|
561
621
|
const token = threadId ? this.getNewCancellationToken(threadId) : undefined;
|
|
562
|
-
return this.raw.variables({
|
|
622
|
+
return this.raw.variables({
|
|
623
|
+
variablesReference,
|
|
624
|
+
filter,
|
|
625
|
+
start,
|
|
626
|
+
count
|
|
627
|
+
}, token);
|
|
563
628
|
}
|
|
564
629
|
evaluate(expression, frameId, context, location) {
|
|
565
630
|
if (!this.raw) {
|
|
566
|
-
throw ( new Error(( localize(
|
|
631
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "evaluate"))));
|
|
567
632
|
}
|
|
568
|
-
return this.raw.evaluate({
|
|
633
|
+
return this.raw.evaluate({
|
|
634
|
+
expression,
|
|
635
|
+
frameId,
|
|
636
|
+
context,
|
|
637
|
+
line: location?.line,
|
|
638
|
+
column: location?.column,
|
|
639
|
+
source: location?.source
|
|
640
|
+
});
|
|
569
641
|
}
|
|
570
642
|
async restartFrame(frameId, threadId) {
|
|
571
643
|
await this.waitForTriggeredBreakpoints();
|
|
572
644
|
if (!this.raw) {
|
|
573
|
-
throw ( new Error(( localize(
|
|
645
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "restartFrame"))));
|
|
574
646
|
}
|
|
575
|
-
await this.raw.restartFrame({
|
|
647
|
+
await this.raw.restartFrame({
|
|
648
|
+
frameId
|
|
649
|
+
}, threadId);
|
|
576
650
|
}
|
|
577
651
|
setLastSteppingGranularity(threadId, granularity) {
|
|
578
652
|
const thread = this.getThread(threadId);
|
|
@@ -583,173 +657,238 @@ let DebugSession = class DebugSession {
|
|
|
583
657
|
async next(threadId, granularity) {
|
|
584
658
|
await this.waitForTriggeredBreakpoints();
|
|
585
659
|
if (!this.raw) {
|
|
586
|
-
throw ( new Error(( localize(
|
|
660
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "next"))));
|
|
587
661
|
}
|
|
588
662
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
589
|
-
await this.raw.next({
|
|
663
|
+
await this.raw.next({
|
|
664
|
+
threadId,
|
|
665
|
+
granularity
|
|
666
|
+
});
|
|
590
667
|
}
|
|
591
668
|
async stepIn(threadId, targetId, granularity) {
|
|
592
669
|
await this.waitForTriggeredBreakpoints();
|
|
593
670
|
if (!this.raw) {
|
|
594
|
-
throw ( new Error(( localize(
|
|
671
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "stepIn"))));
|
|
595
672
|
}
|
|
596
673
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
597
|
-
await this.raw.stepIn({
|
|
674
|
+
await this.raw.stepIn({
|
|
675
|
+
threadId,
|
|
676
|
+
targetId,
|
|
677
|
+
granularity
|
|
678
|
+
});
|
|
598
679
|
}
|
|
599
680
|
async stepOut(threadId, granularity) {
|
|
600
681
|
await this.waitForTriggeredBreakpoints();
|
|
601
682
|
if (!this.raw) {
|
|
602
|
-
throw ( new Error(( localize(
|
|
683
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "stepOut"))));
|
|
603
684
|
}
|
|
604
685
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
605
|
-
await this.raw.stepOut({
|
|
686
|
+
await this.raw.stepOut({
|
|
687
|
+
threadId,
|
|
688
|
+
granularity
|
|
689
|
+
});
|
|
606
690
|
}
|
|
607
691
|
async stepBack(threadId, granularity) {
|
|
608
692
|
await this.waitForTriggeredBreakpoints();
|
|
609
693
|
if (!this.raw) {
|
|
610
|
-
throw ( new Error(( localize(
|
|
694
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "stepBack"))));
|
|
611
695
|
}
|
|
612
696
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
613
|
-
await this.raw.stepBack({
|
|
697
|
+
await this.raw.stepBack({
|
|
698
|
+
threadId,
|
|
699
|
+
granularity
|
|
700
|
+
});
|
|
614
701
|
}
|
|
615
702
|
async continue(threadId) {
|
|
616
703
|
await this.waitForTriggeredBreakpoints();
|
|
617
704
|
if (!this.raw) {
|
|
618
|
-
throw ( new Error(( localize(
|
|
705
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "continue"))));
|
|
619
706
|
}
|
|
620
|
-
await this.raw.continue({
|
|
707
|
+
await this.raw.continue({
|
|
708
|
+
threadId
|
|
709
|
+
});
|
|
621
710
|
}
|
|
622
711
|
async reverseContinue(threadId) {
|
|
623
712
|
await this.waitForTriggeredBreakpoints();
|
|
624
713
|
if (!this.raw) {
|
|
625
|
-
throw ( new Error(( localize(
|
|
714
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "reverse continue"))));
|
|
626
715
|
}
|
|
627
|
-
await this.raw.reverseContinue({
|
|
716
|
+
await this.raw.reverseContinue({
|
|
717
|
+
threadId
|
|
718
|
+
});
|
|
628
719
|
}
|
|
629
720
|
async pause(threadId) {
|
|
630
721
|
if (!this.raw) {
|
|
631
|
-
throw ( new Error(( localize(
|
|
722
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "pause"))));
|
|
632
723
|
}
|
|
633
|
-
await this.raw.pause({
|
|
724
|
+
await this.raw.pause({
|
|
725
|
+
threadId
|
|
726
|
+
});
|
|
634
727
|
}
|
|
635
728
|
async terminateThreads(threadIds) {
|
|
636
729
|
if (!this.raw) {
|
|
637
|
-
throw ( new Error(( localize(
|
|
730
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "terminateThreads"))));
|
|
638
731
|
}
|
|
639
|
-
await this.raw.terminateThreads({
|
|
732
|
+
await this.raw.terminateThreads({
|
|
733
|
+
threadIds
|
|
734
|
+
});
|
|
640
735
|
}
|
|
641
736
|
setVariable(variablesReference, name, value) {
|
|
642
737
|
if (!this.raw) {
|
|
643
|
-
throw ( new Error(( localize(
|
|
738
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "setVariable"))));
|
|
644
739
|
}
|
|
645
|
-
return this.raw.setVariable({
|
|
740
|
+
return this.raw.setVariable({
|
|
741
|
+
variablesReference,
|
|
742
|
+
name,
|
|
743
|
+
value
|
|
744
|
+
});
|
|
646
745
|
}
|
|
647
746
|
setExpression(frameId, expression, value) {
|
|
648
747
|
if (!this.raw) {
|
|
649
|
-
throw ( new Error(( localize(
|
|
748
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "setExpression"))));
|
|
650
749
|
}
|
|
651
|
-
return this.raw.setExpression({
|
|
750
|
+
return this.raw.setExpression({
|
|
751
|
+
expression,
|
|
752
|
+
value,
|
|
753
|
+
frameId
|
|
754
|
+
});
|
|
652
755
|
}
|
|
653
756
|
gotoTargets(source, line, column) {
|
|
654
757
|
if (!this.raw) {
|
|
655
|
-
throw ( new Error(( localize(
|
|
758
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "gotoTargets"))));
|
|
656
759
|
}
|
|
657
|
-
return this.raw.gotoTargets({
|
|
760
|
+
return this.raw.gotoTargets({
|
|
761
|
+
source,
|
|
762
|
+
line,
|
|
763
|
+
column
|
|
764
|
+
});
|
|
658
765
|
}
|
|
659
766
|
goto(threadId, targetId) {
|
|
660
767
|
if (!this.raw) {
|
|
661
|
-
throw ( new Error(( localize(
|
|
768
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "goto"))));
|
|
662
769
|
}
|
|
663
|
-
return this.raw.goto({
|
|
770
|
+
return this.raw.goto({
|
|
771
|
+
threadId,
|
|
772
|
+
targetId
|
|
773
|
+
});
|
|
664
774
|
}
|
|
665
775
|
loadSource(resource) {
|
|
666
776
|
if (!this.raw) {
|
|
667
|
-
return Promise.reject(( new Error(( localize(
|
|
777
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "loadSource")))));
|
|
668
778
|
}
|
|
669
779
|
const source = this.getSourceForUri(resource);
|
|
670
780
|
let rawSource;
|
|
671
781
|
if (source) {
|
|
672
782
|
rawSource = source.raw;
|
|
673
|
-
}
|
|
674
|
-
else {
|
|
783
|
+
} else {
|
|
675
784
|
const data = Source.getEncodedDebugData(resource);
|
|
676
|
-
rawSource = {
|
|
785
|
+
rawSource = {
|
|
786
|
+
path: data.path,
|
|
787
|
+
sourceReference: data.sourceReference
|
|
788
|
+
};
|
|
677
789
|
}
|
|
678
|
-
return this.raw.source({
|
|
790
|
+
return this.raw.source({
|
|
791
|
+
sourceReference: rawSource.sourceReference || 0,
|
|
792
|
+
source: rawSource
|
|
793
|
+
});
|
|
679
794
|
}
|
|
680
795
|
async getLoadedSources() {
|
|
681
796
|
if (!this.raw) {
|
|
682
|
-
return Promise.reject(( new Error(( localize(
|
|
797
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "getLoadedSources")))));
|
|
683
798
|
}
|
|
684
799
|
const response = await this.raw.loadedSources({});
|
|
685
800
|
if (response?.body && response.body.sources) {
|
|
686
801
|
return ( response.body.sources.map(src => this.getSource(src)));
|
|
687
|
-
}
|
|
688
|
-
else {
|
|
802
|
+
} else {
|
|
689
803
|
return [];
|
|
690
804
|
}
|
|
691
805
|
}
|
|
692
806
|
async completions(frameId, threadId, text, position, token) {
|
|
693
807
|
if (!this.raw) {
|
|
694
|
-
return Promise.reject(( new Error(( localize(
|
|
808
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "completions")))));
|
|
695
809
|
}
|
|
696
810
|
const sessionCancelationToken = this.getNewCancellationToken(threadId, token);
|
|
697
811
|
return this.raw.completions({
|
|
698
812
|
frameId,
|
|
699
813
|
text,
|
|
700
814
|
column: position.column,
|
|
701
|
-
line: position.lineNumber
|
|
815
|
+
line: position.lineNumber
|
|
702
816
|
}, sessionCancelationToken);
|
|
703
817
|
}
|
|
704
818
|
async stepInTargets(frameId) {
|
|
705
819
|
if (!this.raw) {
|
|
706
|
-
return Promise.reject(( new Error(( localize(
|
|
820
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "stepInTargets")))));
|
|
707
821
|
}
|
|
708
|
-
const response = await this.raw.stepInTargets({
|
|
822
|
+
const response = await this.raw.stepInTargets({
|
|
823
|
+
frameId
|
|
824
|
+
});
|
|
709
825
|
return response?.body.targets;
|
|
710
826
|
}
|
|
711
827
|
async cancel(progressId) {
|
|
712
828
|
if (!this.raw) {
|
|
713
|
-
return Promise.reject(( new Error(( localize(
|
|
829
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "cancel")))));
|
|
714
830
|
}
|
|
715
|
-
return this.raw.cancel({
|
|
831
|
+
return this.raw.cancel({
|
|
832
|
+
progressId
|
|
833
|
+
});
|
|
716
834
|
}
|
|
717
835
|
async disassemble(memoryReference, offset, instructionOffset, instructionCount) {
|
|
718
836
|
if (!this.raw) {
|
|
719
|
-
return Promise.reject(( new Error(( localize(
|
|
720
|
-
}
|
|
721
|
-
const response = await this.raw.disassemble({
|
|
837
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "disassemble")))));
|
|
838
|
+
}
|
|
839
|
+
const response = await this.raw.disassemble({
|
|
840
|
+
memoryReference,
|
|
841
|
+
offset,
|
|
842
|
+
instructionOffset,
|
|
843
|
+
instructionCount,
|
|
844
|
+
resolveSymbols: true
|
|
845
|
+
});
|
|
722
846
|
return response?.body?.instructions;
|
|
723
847
|
}
|
|
724
848
|
readMemory(memoryReference, offset, count) {
|
|
725
849
|
if (!this.raw) {
|
|
726
|
-
return Promise.reject(( new Error(( localize(
|
|
850
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "readMemory")))));
|
|
727
851
|
}
|
|
728
|
-
return this.raw.readMemory({
|
|
852
|
+
return this.raw.readMemory({
|
|
853
|
+
count,
|
|
854
|
+
memoryReference,
|
|
855
|
+
offset
|
|
856
|
+
});
|
|
729
857
|
}
|
|
730
858
|
writeMemory(memoryReference, offset, data, allowPartial) {
|
|
731
859
|
if (!this.raw) {
|
|
732
|
-
return Promise.reject(( new Error(( localize(
|
|
860
|
+
return Promise.reject(( new Error(( localize(7208, "No debugger available, can not send '{0}'", "disassemble")))));
|
|
733
861
|
}
|
|
734
|
-
return this.raw.writeMemory({
|
|
862
|
+
return this.raw.writeMemory({
|
|
863
|
+
memoryReference,
|
|
864
|
+
offset,
|
|
865
|
+
allowPartial,
|
|
866
|
+
data
|
|
867
|
+
});
|
|
735
868
|
}
|
|
736
869
|
async resolveLocationReference(locationReference) {
|
|
737
870
|
if (!this.raw) {
|
|
738
|
-
throw ( new Error(( localize(
|
|
871
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "locations"))));
|
|
739
872
|
}
|
|
740
|
-
const location = await this.raw.locations({
|
|
873
|
+
const location = await this.raw.locations({
|
|
874
|
+
locationReference
|
|
875
|
+
});
|
|
741
876
|
if (!location?.body) {
|
|
742
|
-
throw ( new Error(( localize(
|
|
877
|
+
throw ( new Error(( localize(7208, "No debugger available, can not send '{0}'", "locations"))));
|
|
743
878
|
}
|
|
744
879
|
const source = this.getSource(location.body.source);
|
|
745
|
-
return {
|
|
880
|
+
return {
|
|
881
|
+
column: 1,
|
|
882
|
+
...location.body,
|
|
883
|
+
source
|
|
884
|
+
};
|
|
746
885
|
}
|
|
747
886
|
getThread(threadId) {
|
|
748
887
|
return this.threads.get(threadId);
|
|
749
888
|
}
|
|
750
889
|
getAllThreads() {
|
|
751
890
|
const result = [];
|
|
752
|
-
this.threadIds.forEach(
|
|
891
|
+
this.threadIds.forEach(threadId => {
|
|
753
892
|
const thread = this.threads.get(threadId);
|
|
754
893
|
if (thread) {
|
|
755
894
|
result.push(thread);
|
|
@@ -768,8 +907,7 @@ let DebugSession = class DebugSession {
|
|
|
768
907
|
this.threads.delete(reference);
|
|
769
908
|
}
|
|
770
909
|
}
|
|
771
|
-
}
|
|
772
|
-
else {
|
|
910
|
+
} else {
|
|
773
911
|
this.threads.forEach(thread => {
|
|
774
912
|
thread.clearCallStack();
|
|
775
913
|
thread.stoppedDetails = undefined;
|
|
@@ -791,8 +929,7 @@ let DebugSession = class DebugSession {
|
|
|
791
929
|
this.threadIds.push(thread.id);
|
|
792
930
|
if (!( this.threads.has(thread.id))) {
|
|
793
931
|
this.threads.set(thread.id, ( new Thread(this, thread.name, thread.id)));
|
|
794
|
-
}
|
|
795
|
-
else if (thread.name) {
|
|
932
|
+
} else if (thread.name) {
|
|
796
933
|
const oldThread = this.threads.get(thread.id);
|
|
797
934
|
if (oldThread) {
|
|
798
935
|
oldThread.name = thread.name;
|
|
@@ -808,13 +945,14 @@ let DebugSession = class DebugSession {
|
|
|
808
945
|
if (stoppedDetails) {
|
|
809
946
|
if (stoppedDetails.allThreadsStopped) {
|
|
810
947
|
this.threads.forEach(thread => {
|
|
811
|
-
thread.stoppedDetails = thread.threadId === stoppedDetails.threadId ? stoppedDetails : {
|
|
948
|
+
thread.stoppedDetails = thread.threadId === stoppedDetails.threadId ? stoppedDetails : {
|
|
949
|
+
reason: thread.stoppedDetails?.reason
|
|
950
|
+
};
|
|
812
951
|
thread.stopped = true;
|
|
813
952
|
thread.clearCallStack();
|
|
814
953
|
});
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
const thread = typeof stoppedDetails.threadId === 'number' ? this.threads.get(stoppedDetails.threadId) : undefined;
|
|
954
|
+
} else {
|
|
955
|
+
const thread = typeof stoppedDetails.threadId === "number" ? this.threads.get(stoppedDetails.threadId) : undefined;
|
|
818
956
|
if (thread) {
|
|
819
957
|
thread.stoppedDetails = stoppedDetails;
|
|
820
958
|
thread.clearCallStack();
|
|
@@ -850,15 +988,12 @@ let DebugSession = class DebugSession {
|
|
|
850
988
|
return;
|
|
851
989
|
}
|
|
852
990
|
this.rawListeners.add(this.raw.onDidInitialize(async () => {
|
|
853
|
-
status(this.configuration.noDebug
|
|
854
|
-
? ( localize(6900, "Started running without debugging."))
|
|
855
|
-
: ( localize(6901, "Debugging started.")));
|
|
991
|
+
status(this.configuration.noDebug ? ( localize(7211, "Started running without debugging.")) : ( localize(7212, "Debugging started.")));
|
|
856
992
|
const sendConfigurationDone = async () => {
|
|
857
993
|
if (this.raw && this.raw.capabilities.supportsConfigurationDoneRequest) {
|
|
858
994
|
try {
|
|
859
995
|
await this.raw.configurationDone();
|
|
860
|
-
}
|
|
861
|
-
catch (e) {
|
|
996
|
+
} catch (e) {
|
|
862
997
|
this.notificationService.error(e);
|
|
863
998
|
this.raw?.disconnect({});
|
|
864
999
|
}
|
|
@@ -867,8 +1002,7 @@ let DebugSession = class DebugSession {
|
|
|
867
1002
|
};
|
|
868
1003
|
try {
|
|
869
1004
|
await this.debugService.sendAllBreakpoints(this);
|
|
870
|
-
}
|
|
871
|
-
finally {
|
|
1005
|
+
} finally {
|
|
872
1006
|
await sendConfigurationDone();
|
|
873
1007
|
await this.fetchThreads();
|
|
874
1008
|
}
|
|
@@ -877,48 +1011,47 @@ let DebugSession = class DebugSession {
|
|
|
877
1011
|
this.rawListeners.add(this.raw.onDidStop(event => this.handleStop(event.body)));
|
|
878
1012
|
this.rawListeners.add(this.raw.onDidThread(event => {
|
|
879
1013
|
statusQueue.cancel([event.body.threadId]);
|
|
880
|
-
if (event.body.reason ===
|
|
1014
|
+
if (event.body.reason === "started") {
|
|
881
1015
|
if (!this.fetchThreadsScheduler.value.isScheduled()) {
|
|
882
1016
|
this.fetchThreadsScheduler.value.schedule();
|
|
883
1017
|
}
|
|
884
|
-
}
|
|
885
|
-
else if (event.body.reason === 'exited') {
|
|
1018
|
+
} else if (event.body.reason === "exited") {
|
|
886
1019
|
this.model.clearThreads(this.getId(), true, event.body.threadId);
|
|
887
1020
|
const viewModel = this.debugService.getViewModel();
|
|
888
1021
|
const focusedThread = viewModel.focusedThread;
|
|
889
1022
|
this.passFocusScheduler.cancel();
|
|
890
1023
|
if (focusedThread && event.body.threadId === focusedThread.threadId) {
|
|
891
|
-
this.debugService.focusStackFrame(undefined, undefined, viewModel.focusedSession, {
|
|
1024
|
+
this.debugService.focusStackFrame(undefined, undefined, viewModel.focusedSession, {
|
|
1025
|
+
explicit: false
|
|
1026
|
+
});
|
|
892
1027
|
}
|
|
893
1028
|
}
|
|
894
1029
|
}));
|
|
895
|
-
this.rawListeners.add(this.raw.onDidTerminateDebugee(async
|
|
896
|
-
status(( localize(
|
|
1030
|
+
this.rawListeners.add(this.raw.onDidTerminateDebugee(async event => {
|
|
1031
|
+
status(( localize(7213, "Debugging stopped.")));
|
|
897
1032
|
if (event.body && event.body.restart) {
|
|
898
1033
|
await this.debugService.restartSession(this, event.body.restart);
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
|
|
1034
|
+
} else if (this.raw) {
|
|
1035
|
+
await this.raw.disconnect({
|
|
1036
|
+
terminateDebuggee: false
|
|
1037
|
+
});
|
|
902
1038
|
}
|
|
903
1039
|
}));
|
|
904
|
-
this.rawListeners.add(this.raw.onDidContinued(async
|
|
1040
|
+
this.rawListeners.add(this.raw.onDidContinued(async event => {
|
|
905
1041
|
const allThreads = event.body.allThreadsContinued !== false;
|
|
906
1042
|
let affectedThreads;
|
|
907
1043
|
if (!allThreads) {
|
|
908
1044
|
affectedThreads = [event.body.threadId];
|
|
909
1045
|
if (this.threadIds.includes(event.body.threadId)) {
|
|
910
1046
|
affectedThreads = [event.body.threadId];
|
|
911
|
-
}
|
|
912
|
-
else {
|
|
1047
|
+
} else {
|
|
913
1048
|
this.fetchThreadsScheduler.rawValue?.cancel();
|
|
914
1049
|
affectedThreads = this.fetchThreads().then(() => [event.body.threadId]);
|
|
915
1050
|
}
|
|
916
|
-
}
|
|
917
|
-
else if (this.fetchThreadsScheduler.value.isScheduled()) {
|
|
1051
|
+
} else if (this.fetchThreadsScheduler.value.isScheduled()) {
|
|
918
1052
|
this.fetchThreadsScheduler.value.cancel();
|
|
919
1053
|
affectedThreads = this.fetchThreads().then(() => this.threadIds);
|
|
920
|
-
}
|
|
921
|
-
else {
|
|
1054
|
+
} else {
|
|
922
1055
|
affectedThreads = this.threadIds;
|
|
923
1056
|
}
|
|
924
1057
|
statusQueue.cancel(allThreads ? undefined : [event.body.threadId]);
|
|
@@ -935,8 +1068,8 @@ let DebugSession = class DebugSession {
|
|
|
935
1068
|
this._onDidChangeState.fire();
|
|
936
1069
|
}));
|
|
937
1070
|
const outputQueue = ( new Queue());
|
|
938
|
-
this.rawListeners.add(this.raw.onDidOutput(async
|
|
939
|
-
const outputSeverity = event.body.category ===
|
|
1071
|
+
this.rawListeners.add(this.raw.onDidOutput(async event => {
|
|
1072
|
+
const outputSeverity = event.body.category === "stderr" ? Severity.Error : event.body.category === "console" ? Severity.Warning : Severity.Info;
|
|
940
1073
|
if (event.body.variablesReference) {
|
|
941
1074
|
const source = event.body.source && event.body.line ? {
|
|
942
1075
|
lineNumber: event.body.line,
|
|
@@ -948,12 +1081,22 @@ let DebugSession = class DebugSession {
|
|
|
948
1081
|
outputQueue.queue(async () => {
|
|
949
1082
|
const resolved = await children;
|
|
950
1083
|
if (resolved.length === 1) {
|
|
951
|
-
this.appendToRepl({
|
|
1084
|
+
this.appendToRepl({
|
|
1085
|
+
output: event.body.output,
|
|
1086
|
+
expression: resolved[0],
|
|
1087
|
+
sev: outputSeverity,
|
|
1088
|
+
source
|
|
1089
|
+
}, event.body.category === "important");
|
|
952
1090
|
return;
|
|
953
1091
|
}
|
|
954
|
-
resolved.forEach(
|
|
1092
|
+
resolved.forEach(child => {
|
|
955
1093
|
child.name = null;
|
|
956
|
-
this.appendToRepl({
|
|
1094
|
+
this.appendToRepl({
|
|
1095
|
+
output: "",
|
|
1096
|
+
expression: child,
|
|
1097
|
+
sev: outputSeverity,
|
|
1098
|
+
source
|
|
1099
|
+
}, event.body.category === "important");
|
|
957
1100
|
});
|
|
958
1101
|
});
|
|
959
1102
|
return;
|
|
@@ -962,7 +1105,7 @@ let DebugSession = class DebugSession {
|
|
|
962
1105
|
if (!event.body || !this.raw) {
|
|
963
1106
|
return;
|
|
964
1107
|
}
|
|
965
|
-
if (event.body.category ===
|
|
1108
|
+
if (event.body.category === "telemetry") {
|
|
966
1109
|
const telemetryEndpoint = this.raw.dbgr.getCustomTelemetryEndpoint();
|
|
967
1110
|
if (telemetryEndpoint && this.telemetryService.telemetryLevel !== TelemetryLevel.NONE) {
|
|
968
1111
|
let data = event.body.data;
|
|
@@ -978,19 +1121,23 @@ let DebugSession = class DebugSession {
|
|
|
978
1121
|
column: event.body.column ? event.body.column : 1,
|
|
979
1122
|
source: this.getSource(event.body.source)
|
|
980
1123
|
} : undefined;
|
|
981
|
-
if (event.body.group ===
|
|
982
|
-
const expanded = event.body.group ===
|
|
983
|
-
this.repl.startGroup(this, event.body.output ||
|
|
1124
|
+
if (event.body.group === "start" || event.body.group === "startCollapsed") {
|
|
1125
|
+
const expanded = event.body.group === "start";
|
|
1126
|
+
this.repl.startGroup(this, event.body.output || "", expanded, source);
|
|
984
1127
|
return;
|
|
985
1128
|
}
|
|
986
|
-
if (event.body.group ===
|
|
1129
|
+
if (event.body.group === "end") {
|
|
987
1130
|
this.repl.endGroup();
|
|
988
1131
|
if (!event.body.output) {
|
|
989
1132
|
return;
|
|
990
1133
|
}
|
|
991
1134
|
}
|
|
992
|
-
if (typeof event.body.output ===
|
|
993
|
-
this.appendToRepl({
|
|
1135
|
+
if (typeof event.body.output === "string") {
|
|
1136
|
+
this.appendToRepl({
|
|
1137
|
+
output: event.body.output,
|
|
1138
|
+
sev: outputSeverity,
|
|
1139
|
+
source
|
|
1140
|
+
}, event.body.category === "important");
|
|
994
1141
|
}
|
|
995
1142
|
});
|
|
996
1143
|
}));
|
|
@@ -1000,19 +1147,19 @@ let DebugSession = class DebugSession {
|
|
|
1000
1147
|
const functionBreakpoint = this.model.getFunctionBreakpoints().find(bp => bp.getIdFromAdapter(this.getId()) === id);
|
|
1001
1148
|
const dataBreakpoint = this.model.getDataBreakpoints().find(dbp => dbp.getIdFromAdapter(this.getId()) === id);
|
|
1002
1149
|
const exceptionBreakpoint = this.model.getExceptionBreakpoints().find(excbp => excbp.getIdFromAdapter(this.getId()) === id);
|
|
1003
|
-
if (event.body.reason ===
|
|
1150
|
+
if (event.body.reason === "new" && event.body.breakpoint.source && event.body.breakpoint.line) {
|
|
1004
1151
|
const source = this.getSource(event.body.breakpoint.source);
|
|
1005
1152
|
const bps = this.model.addBreakpoints(source.uri, [{
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1153
|
+
column: event.body.breakpoint.column,
|
|
1154
|
+
enabled: true,
|
|
1155
|
+
lineNumber: event.body.breakpoint.line
|
|
1156
|
+
}], false);
|
|
1010
1157
|
if (bps.length === 1) {
|
|
1011
1158
|
const data = ( new Map([[bps[0].getId(), event.body.breakpoint]]));
|
|
1012
1159
|
this.model.setBreakpointSessionData(this.getId(), this.capabilities, data);
|
|
1013
1160
|
}
|
|
1014
1161
|
}
|
|
1015
|
-
if (event.body.reason ===
|
|
1162
|
+
if (event.body.reason === "removed") {
|
|
1016
1163
|
if (breakpoint) {
|
|
1017
1164
|
this.model.removeBreakpoints([breakpoint]);
|
|
1018
1165
|
}
|
|
@@ -1023,7 +1170,7 @@ let DebugSession = class DebugSession {
|
|
|
1023
1170
|
this.model.removeDataBreakpoints(dataBreakpoint.getId());
|
|
1024
1171
|
}
|
|
1025
1172
|
}
|
|
1026
|
-
if (event.body.reason ===
|
|
1173
|
+
if (event.body.reason === "changed") {
|
|
1027
1174
|
if (breakpoint) {
|
|
1028
1175
|
if (!breakpoint.column) {
|
|
1029
1176
|
event.body.breakpoint.column = undefined;
|
|
@@ -1066,17 +1213,16 @@ let DebugSession = class DebugSession {
|
|
|
1066
1213
|
this.rawListeners.add(this.raw.onDidInvalidateMemory(event => {
|
|
1067
1214
|
this._onDidInvalidMemory.fire(event);
|
|
1068
1215
|
}));
|
|
1069
|
-
this.rawListeners.add(this.raw.onDidInvalidated(async
|
|
1070
|
-
const areas = event.body.areas || [
|
|
1071
|
-
if (areas.includes(
|
|
1216
|
+
this.rawListeners.add(this.raw.onDidInvalidated(async event => {
|
|
1217
|
+
const areas = event.body.areas || ["all"];
|
|
1218
|
+
if (areas.includes("threads") || areas.includes("stacks") || areas.includes("all")) {
|
|
1072
1219
|
this.cancelAllRequests();
|
|
1073
1220
|
this.model.clearThreads(this.getId(), true);
|
|
1074
1221
|
const details = this.stoppedDetails.slice();
|
|
1075
1222
|
this.stoppedDetails.length = 0;
|
|
1076
1223
|
if (details.length) {
|
|
1077
1224
|
await Promise.all(( details.map(d => this.handleStop(d))));
|
|
1078
|
-
}
|
|
1079
|
-
else if (!this.fetchThreadsScheduler.value.isScheduled()) {
|
|
1225
|
+
} else if (!this.fetchThreadsScheduler.value.isScheduled()) {
|
|
1080
1226
|
this.fetchThreadsScheduler.value.schedule();
|
|
1081
1227
|
}
|
|
1082
1228
|
}
|
|
@@ -1093,73 +1239,88 @@ let DebugSession = class DebugSession {
|
|
|
1093
1239
|
if (event.hitBreakpointIds) {
|
|
1094
1240
|
this._waitToResume = this.enableDependentBreakpoints(event.hitBreakpointIds);
|
|
1095
1241
|
}
|
|
1096
|
-
this.statusQueue.run(
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
this.
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1242
|
+
this.statusQueue.run(
|
|
1243
|
+
this.fetchThreads(event).then(() => event.threadId === undefined ? this.threadIds : [event.threadId]),
|
|
1244
|
+
async (threadId, token) => {
|
|
1245
|
+
const hasLotsOfThreads = event.threadId === undefined && this.threadIds.length > 10;
|
|
1246
|
+
const focusedThread = this.debugService.getViewModel().focusedThread;
|
|
1247
|
+
const focusedThreadDoesNotExist = focusedThread !== undefined && focusedThread.session === this && !( this.threads.has(focusedThread.threadId));
|
|
1248
|
+
if (focusedThreadDoesNotExist) {
|
|
1249
|
+
this.debugService.focusStackFrame(undefined, undefined);
|
|
1250
|
+
}
|
|
1251
|
+
const thread = typeof threadId === "number" ? this.getThread(threadId) : undefined;
|
|
1252
|
+
if (thread) {
|
|
1253
|
+
const promises = this.model.refreshTopOfCallstack(thread, !hasLotsOfThreads);
|
|
1254
|
+
const focus = async () => {
|
|
1255
|
+
if (focusedThreadDoesNotExist || (!event.preserveFocusHint && thread.getCallStack().length)) {
|
|
1256
|
+
const focusedStackFrame = this.debugService.getViewModel().focusedStackFrame;
|
|
1257
|
+
if (!focusedStackFrame || focusedStackFrame.thread.session === this) {
|
|
1258
|
+
const preserveFocus = !this.configurationService.getValue("debug").focusEditorOnBreak;
|
|
1259
|
+
await this.debugService.focusStackFrame(undefined, thread, undefined, {
|
|
1260
|
+
preserveFocus
|
|
1261
|
+
});
|
|
1116
1262
|
}
|
|
1117
|
-
if (
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1263
|
+
if (thread.stoppedDetails && !token.isCancellationRequested) {
|
|
1264
|
+
if (thread.stoppedDetails.reason === "breakpoint" && this.configurationService.getValue("debug").openDebug === "openOnDebugBreak" && !this.suppressDebugView) {
|
|
1265
|
+
await this.paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar);
|
|
1266
|
+
}
|
|
1267
|
+
if (this.configurationService.getValue("debug").focusWindowOnBreak && !this.workbenchEnvironmentService.extensionTestsLocationURI) {
|
|
1268
|
+
const activeWindow = getActiveWindow();
|
|
1269
|
+
if (!activeWindow.document.hasFocus()) {
|
|
1270
|
+
await this.hostService.focus(mainWindow, {
|
|
1271
|
+
mode: FocusMode.Force
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1121
1274
|
}
|
|
1122
1275
|
}
|
|
1123
1276
|
}
|
|
1277
|
+
};
|
|
1278
|
+
await promises.topCallStack;
|
|
1279
|
+
if (!event.hitBreakpointIds) {
|
|
1280
|
+
this._waitToResume = this.enableDependentBreakpoints(thread);
|
|
1281
|
+
}
|
|
1282
|
+
if (token.isCancellationRequested) {
|
|
1283
|
+
return;
|
|
1124
1284
|
}
|
|
1125
|
-
};
|
|
1126
|
-
await promises.topCallStack;
|
|
1127
|
-
if (!event.hitBreakpointIds) {
|
|
1128
|
-
this._waitToResume = this.enableDependentBreakpoints(thread);
|
|
1129
|
-
}
|
|
1130
|
-
if (token.isCancellationRequested) {
|
|
1131
|
-
return;
|
|
1132
|
-
}
|
|
1133
|
-
focus();
|
|
1134
|
-
await promises.wholeCallStack;
|
|
1135
|
-
if (token.isCancellationRequested) {
|
|
1136
|
-
return;
|
|
1137
|
-
}
|
|
1138
|
-
const focusedStackFrame = this.debugService.getViewModel().focusedStackFrame;
|
|
1139
|
-
if (!focusedStackFrame || isFrameDeemphasized(focusedStackFrame)) {
|
|
1140
1285
|
focus();
|
|
1286
|
+
await promises.wholeCallStack;
|
|
1287
|
+
if (token.isCancellationRequested) {
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
const focusedStackFrame = this.debugService.getViewModel().focusedStackFrame;
|
|
1291
|
+
if (!focusedStackFrame || isFrameDeemphasized(focusedStackFrame)) {
|
|
1292
|
+
focus();
|
|
1293
|
+
}
|
|
1141
1294
|
}
|
|
1295
|
+
this._onDidChangeState.fire();
|
|
1142
1296
|
}
|
|
1143
|
-
|
|
1144
|
-
});
|
|
1297
|
+
);
|
|
1145
1298
|
}
|
|
1146
1299
|
async enableDependentBreakpoints(hitBreakpointIdsOrThread) {
|
|
1147
1300
|
let breakpoints;
|
|
1148
1301
|
if (Array.isArray(hitBreakpointIdsOrThread)) {
|
|
1149
1302
|
breakpoints = this.model.getBreakpoints().filter(bp => hitBreakpointIdsOrThread.includes(bp.getIdFromAdapter(this.id)));
|
|
1150
|
-
}
|
|
1151
|
-
else {
|
|
1303
|
+
} else {
|
|
1152
1304
|
const frame = hitBreakpointIdsOrThread.getTopStackFrame();
|
|
1153
1305
|
if (frame === undefined) {
|
|
1154
1306
|
return;
|
|
1155
1307
|
}
|
|
1156
|
-
if (hitBreakpointIdsOrThread.stoppedDetails && hitBreakpointIdsOrThread.stoppedDetails.reason !==
|
|
1308
|
+
if (hitBreakpointIdsOrThread.stoppedDetails && hitBreakpointIdsOrThread.stoppedDetails.reason !== "breakpoint") {
|
|
1157
1309
|
return;
|
|
1158
1310
|
}
|
|
1159
|
-
breakpoints = this.getBreakpointsAtPosition(
|
|
1311
|
+
breakpoints = this.getBreakpointsAtPosition(
|
|
1312
|
+
frame.source.uri,
|
|
1313
|
+
frame.range.startLineNumber,
|
|
1314
|
+
frame.range.endLineNumber,
|
|
1315
|
+
frame.range.startColumn,
|
|
1316
|
+
frame.range.endColumn
|
|
1317
|
+
);
|
|
1160
1318
|
}
|
|
1161
1319
|
const urisToResend = ( new Set());
|
|
1162
|
-
this.model.getBreakpoints({
|
|
1320
|
+
this.model.getBreakpoints({
|
|
1321
|
+
triggeredOnly: true,
|
|
1322
|
+
enabledOnly: true
|
|
1323
|
+
}).forEach(bp => {
|
|
1163
1324
|
breakpoints.forEach(cbp => {
|
|
1164
1325
|
if (bp.enabled && bp.triggeredBy === cbp.getId()) {
|
|
1165
1326
|
bp.setSessionDidTrigger(this.getId());
|
|
@@ -1168,11 +1329,13 @@ let DebugSession = class DebugSession {
|
|
|
1168
1329
|
});
|
|
1169
1330
|
});
|
|
1170
1331
|
const results = [];
|
|
1171
|
-
urisToResend.forEach(
|
|
1332
|
+
urisToResend.forEach(uri => results.push(this.debugService.sendBreakpoints(( URI.parse(uri)), undefined, this)));
|
|
1172
1333
|
return Promise.all(results);
|
|
1173
1334
|
}
|
|
1174
1335
|
getBreakpointsAtPosition(uri, startLineNumber, endLineNumber, startColumn, endColumn) {
|
|
1175
|
-
return this.model.getBreakpoints({
|
|
1336
|
+
return this.model.getBreakpoints({
|
|
1337
|
+
uri: uri
|
|
1338
|
+
}).filter(bp => {
|
|
1176
1339
|
if (bp.lineNumber < startLineNumber || bp.lineNumber > endLineNumber) {
|
|
1177
1340
|
return false;
|
|
1178
1341
|
}
|
|
@@ -1223,8 +1386,7 @@ let DebugSession = class DebugSession {
|
|
|
1223
1386
|
if (source.raw && raw) {
|
|
1224
1387
|
source.raw.presentationHint = raw.presentationHint;
|
|
1225
1388
|
}
|
|
1226
|
-
}
|
|
1227
|
-
else {
|
|
1389
|
+
} else {
|
|
1228
1390
|
this.sources.set(uriKey, source);
|
|
1229
1391
|
}
|
|
1230
1392
|
return source;
|
|
@@ -1233,10 +1395,13 @@ let DebugSession = class DebugSession {
|
|
|
1233
1395
|
const source = this.getSourceForUri(uri);
|
|
1234
1396
|
if (source) {
|
|
1235
1397
|
return source.raw;
|
|
1236
|
-
}
|
|
1237
|
-
else {
|
|
1398
|
+
} else {
|
|
1238
1399
|
const data = Source.getEncodedDebugData(uri);
|
|
1239
|
-
return {
|
|
1400
|
+
return {
|
|
1401
|
+
name: data.name,
|
|
1402
|
+
path: data.path,
|
|
1403
|
+
sourceReference: data.sourceReference
|
|
1404
|
+
};
|
|
1240
1405
|
}
|
|
1241
1406
|
}
|
|
1242
1407
|
getNewCancellationToken(threadId, token) {
|
|
@@ -1254,7 +1419,7 @@ let DebugSession = class DebugSession {
|
|
|
1254
1419
|
return this.repl.getReplElements();
|
|
1255
1420
|
}
|
|
1256
1421
|
hasSeparateRepl() {
|
|
1257
|
-
return !this.parentSession || this._options.repl !==
|
|
1422
|
+
return !this.parentSession || this._options.repl !== "mergeWithParent";
|
|
1258
1423
|
}
|
|
1259
1424
|
removeReplExpressions() {
|
|
1260
1425
|
this.repl.removeReplExpressions();
|
|
@@ -1266,29 +1431,15 @@ let DebugSession = class DebugSession {
|
|
|
1266
1431
|
appendToRepl(data, isImportant) {
|
|
1267
1432
|
this.repl.appendToRepl(this, data);
|
|
1268
1433
|
if (isImportant) {
|
|
1269
|
-
this.notificationService.notify({
|
|
1434
|
+
this.notificationService.notify({
|
|
1435
|
+
message: ( data.output.toString()),
|
|
1436
|
+
severity: data.sev,
|
|
1437
|
+
source: this.name
|
|
1438
|
+
});
|
|
1270
1439
|
}
|
|
1271
1440
|
}
|
|
1272
1441
|
};
|
|
1273
|
-
DebugSession = ( __decorate([
|
|
1274
|
-
( __param(5, IDebugService)),
|
|
1275
|
-
( __param(6, ITelemetryService)),
|
|
1276
|
-
( __param(7, IHostService)),
|
|
1277
|
-
( __param(8, IConfigurationService)),
|
|
1278
|
-
( __param(9, IPaneCompositePartService)),
|
|
1279
|
-
( __param(10, IWorkspaceContextService)),
|
|
1280
|
-
( __param(11, IProductService)),
|
|
1281
|
-
( __param(12, INotificationService)),
|
|
1282
|
-
( __param(13, ILifecycleService)),
|
|
1283
|
-
( __param(14, IUriIdentityService)),
|
|
1284
|
-
( __param(15, IInstantiationService)),
|
|
1285
|
-
( __param(16, ICustomEndpointTelemetryService)),
|
|
1286
|
-
( __param(17, IWorkbenchEnvironmentService)),
|
|
1287
|
-
( __param(18, ILogService)),
|
|
1288
|
-
( __param(19, ITestService)),
|
|
1289
|
-
( __param(20, ITestResultService)),
|
|
1290
|
-
( __param(21, IAccessibilityService))
|
|
1291
|
-
], DebugSession));
|
|
1442
|
+
DebugSession = ( __decorate([( __param(5, IDebugService)), ( __param(6, ITelemetryService)), ( __param(7, IHostService)), ( __param(8, IConfigurationService)), ( __param(9, IPaneCompositePartService)), ( __param(10, IWorkspaceContextService)), ( __param(11, IProductService)), ( __param(12, INotificationService)), ( __param(13, ILifecycleService)), ( __param(14, IUriIdentityService)), ( __param(15, IInstantiationService)), ( __param(16, ICustomEndpointTelemetryService)), ( __param(17, IWorkbenchEnvironmentService)), ( __param(18, ILogService)), ( __param(19, ITestService)), ( __param(20, ITestResultService)), ( __param(21, IAccessibilityService))], DebugSession));
|
|
1292
1443
|
class ThreadStatusScheduler extends Disposable {
|
|
1293
1444
|
constructor() {
|
|
1294
1445
|
super(...arguments);
|
|
@@ -1304,8 +1455,7 @@ class ThreadStatusScheduler extends Disposable {
|
|
|
1304
1455
|
if (s === cancelledWhileLookingUpThreads) {
|
|
1305
1456
|
this.pendingCancellations.splice(i, 1);
|
|
1306
1457
|
break;
|
|
1307
|
-
}
|
|
1308
|
-
else {
|
|
1458
|
+
} else {
|
|
1309
1459
|
for (const threadId of threadIds) {
|
|
1310
1460
|
s.add(threadId);
|
|
1311
1461
|
}
|
|
@@ -1333,8 +1483,7 @@ class ThreadStatusScheduler extends Disposable {
|
|
|
1333
1483
|
for (const s of this.pendingCancellations) {
|
|
1334
1484
|
s.add(undefined);
|
|
1335
1485
|
}
|
|
1336
|
-
}
|
|
1337
|
-
else {
|
|
1486
|
+
} else {
|
|
1338
1487
|
for (const threadId of threadIds) {
|
|
1339
1488
|
this.threadOps.get(threadId)?.cancel();
|
|
1340
1489
|
this.threadOps.deleteAndDispose(threadId);
|