@codingame/monaco-vscode-debug-service-override 17.2.0 → 18.0.0
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 +18 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +24 -24
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +116 -111
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +7 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +13 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +10 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +22 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +45 -44
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +17 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +19 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +10 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +21 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +10 -11
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +46 -46
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +12 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +2 -2
|
@@ -32,7 +32,7 @@ import { IWorkspaceTrustRequestService } from '@codingame/monaco-vscode-api/vsco
|
|
|
32
32
|
import { EditorsOrder } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
33
33
|
import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
34
34
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
35
|
-
import { NumberBadge } from '@codingame/monaco-vscode-
|
|
35
|
+
import { NumberBadge } from '@codingame/monaco-vscode-937ecbdf-94c7-5b16-aefa-ad78ae557a93-common/vscode/vs/workbench/services/activity/common/activity';
|
|
36
36
|
import { IActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service';
|
|
37
37
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
38
38
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
@@ -142,7 +142,7 @@ let DebugService = class DebugService {
|
|
|
142
142
|
if (numberOfSessions > 0) {
|
|
143
143
|
const viewContainer = this.viewDescriptorService.getViewContainerByViewId(CALLSTACK_VIEW_ID);
|
|
144
144
|
if (viewContainer) {
|
|
145
|
-
this.activity = this.activityService.showViewContainerActivity(viewContainer.id, { badge: ( new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(
|
|
145
|
+
this.activity = this.activityService.showViewContainerActivity(viewContainer.id, { badge: ( new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(5945, "1 active session")) : ( localize(5946, "{0} active sessions", n)))) });
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
}));
|
|
@@ -164,7 +164,7 @@ let DebugService = class DebugService {
|
|
|
164
164
|
}
|
|
165
165
|
}));
|
|
166
166
|
this.disposables.add(extensionService.onWillStop(evt => {
|
|
167
|
-
evt.veto(this.model.getSessions().length > 0, ( localize(
|
|
167
|
+
evt.veto(this.model.getSessions().length > 0, ( localize(5947, 'A debug session is still running that would terminate.')));
|
|
168
168
|
}));
|
|
169
169
|
this.initContextKeys(contextKeyService);
|
|
170
170
|
}
|
|
@@ -273,8 +273,8 @@ let DebugService = class DebugService {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
async startDebugging(launch, configOrName, options, saveBeforeStart = !options?.parentSession) {
|
|
276
|
-
const message = options && options.noDebug ? ( localize(
|
|
277
|
-
|
|
276
|
+
const message = options && options.noDebug ? ( localize(5948, "Running executes build tasks and program code from your workspace.")) : ( localize(
|
|
277
|
+
5949,
|
|
278
278
|
"Debugging executes build tasks and program code from your workspace."
|
|
279
279
|
));
|
|
280
280
|
const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({ message });
|
|
@@ -305,7 +305,7 @@ let DebugService = class DebugService {
|
|
|
305
305
|
if (compound) {
|
|
306
306
|
if (!compound.configurations) {
|
|
307
307
|
throw ( new Error(( localize(
|
|
308
|
-
|
|
308
|
+
5950,
|
|
309
309
|
"Compound must have \"configurations\" attribute set in order to start multiple configurations."
|
|
310
310
|
))));
|
|
311
311
|
}
|
|
@@ -334,9 +334,9 @@ let DebugService = class DebugService {
|
|
|
334
334
|
launchForName = launch;
|
|
335
335
|
}
|
|
336
336
|
else {
|
|
337
|
-
throw ( new Error(launchesContainingName.length === 0 ? ( localize(
|
|
337
|
+
throw ( new Error(launchesContainingName.length === 0 ? ( localize(5951, "Could not find launch configuration '{0}' in the workspace.", name))
|
|
338
338
|
: ( localize(
|
|
339
|
-
|
|
339
|
+
5952,
|
|
340
340
|
"There are multiple launch configurations '{0}' in the workspace. Use folder name to qualify the configuration.",
|
|
341
341
|
name
|
|
342
342
|
))));
|
|
@@ -349,7 +349,7 @@ let DebugService = class DebugService {
|
|
|
349
349
|
}
|
|
350
350
|
else {
|
|
351
351
|
throw ( new Error(( localize(
|
|
352
|
-
|
|
352
|
+
5953,
|
|
353
353
|
"Can not find folder with name '{0}' for configuration '{1}' in compound '{2}'.",
|
|
354
354
|
configData.folder,
|
|
355
355
|
configData.name,
|
|
@@ -365,11 +365,11 @@ let DebugService = class DebugService {
|
|
|
365
365
|
}
|
|
366
366
|
if (configOrName && !config) {
|
|
367
367
|
const message = !!launch ? ( localize(
|
|
368
|
-
|
|
368
|
+
5954,
|
|
369
369
|
"Configuration '{0}' is missing in 'launch.json'.",
|
|
370
370
|
typeof configOrName === 'string' ? configOrName : configOrName.name
|
|
371
371
|
)) :
|
|
372
|
-
( localize(
|
|
372
|
+
( localize(5955, "'launch.json' does not exist for passed workspace folder."));
|
|
373
373
|
throw ( new Error(message));
|
|
374
374
|
}
|
|
375
375
|
const result = await this.createSession(launch, config, options);
|
|
@@ -457,23 +457,23 @@ let DebugService = class DebugService {
|
|
|
457
457
|
let message;
|
|
458
458
|
if (configByProviders.request !== 'attach' && configByProviders.request !== 'launch') {
|
|
459
459
|
message = configByProviders.request ? ( localize(
|
|
460
|
-
|
|
460
|
+
5956,
|
|
461
461
|
"Attribute '{0}' has an unsupported value '{1}' in the chosen debug configuration.",
|
|
462
462
|
'request',
|
|
463
463
|
configByProviders.request
|
|
464
464
|
))
|
|
465
465
|
: ( localize(
|
|
466
|
-
|
|
466
|
+
5957,
|
|
467
467
|
"Attribute '{0}' is missing from the chosen debug configuration.",
|
|
468
468
|
'request'
|
|
469
469
|
));
|
|
470
470
|
}
|
|
471
471
|
else {
|
|
472
|
-
message = resolvedConfig.type ? ( localize(
|
|
473
|
-
( localize(
|
|
472
|
+
message = resolvedConfig.type ? ( localize(5958, "Configured debug type '{0}' is not supported.", resolvedConfig.type)) :
|
|
473
|
+
( localize(5959, "Missing property 'type' for the chosen launch configuration."));
|
|
474
474
|
}
|
|
475
475
|
const actionList = [];
|
|
476
|
-
actionList.push(( new Action('installAdditionalDebuggers', ( localize(
|
|
476
|
+
actionList.push(( new Action('installAdditionalDebuggers', ( localize(5960, "Install {0} Extension", resolvedConfig.type)), undefined, true, async () => this.commandService.executeCommand('debug.installAdditionalDebuggers', resolvedConfig?.type))));
|
|
477
477
|
await this.showError(message, actionList);
|
|
478
478
|
return false;
|
|
479
479
|
}
|
|
@@ -494,7 +494,7 @@ let DebugService = class DebugService {
|
|
|
494
494
|
}
|
|
495
495
|
else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
|
|
496
496
|
await this.showError(( localize(
|
|
497
|
-
|
|
497
|
+
5961,
|
|
498
498
|
"The active file can not be debugged. Make sure it is saved and that you have a debug extension installed for that file type."
|
|
499
499
|
)));
|
|
500
500
|
}
|
|
@@ -513,7 +513,7 @@ let DebugService = class DebugService {
|
|
|
513
513
|
const session = this.instantiationService.createInstance(DebugSession, sessionId, configuration, root, this.model, options);
|
|
514
514
|
if (options?.startedByUser && ( this.model.getSessions().some(s => s.getLabel() === session.getLabel())) && configuration.resolved.suppressMultipleSessionWarning !== true) {
|
|
515
515
|
const result = await this.dialogService.confirm({ message: ( localize(
|
|
516
|
-
|
|
516
|
+
5962,
|
|
517
517
|
"'{0}' is already running. Do you want to start another instance?",
|
|
518
518
|
session.getLabel()
|
|
519
519
|
)) });
|
|
@@ -604,7 +604,7 @@ let DebugService = class DebugService {
|
|
|
604
604
|
if (adapterExitEvent) {
|
|
605
605
|
if (adapterExitEvent.error) {
|
|
606
606
|
this.notificationService.error(( localize(
|
|
607
|
-
|
|
607
|
+
5963,
|
|
608
608
|
"Debug adapter process has terminated unexpectedly ({0})",
|
|
609
609
|
adapterExitEvent.error.message || ( adapterExitEvent.error.toString())
|
|
610
610
|
)));
|
|
@@ -848,7 +848,7 @@ let DebugService = class DebugService {
|
|
|
848
848
|
if (lineNumber >= 1 && lineNumber <= model.getLineCount()) {
|
|
849
849
|
const lineContent = control.getModel().getLineContent(lineNumber);
|
|
850
850
|
alert(( localize(
|
|
851
|
-
|
|
851
|
+
5964,
|
|
852
852
|
"{0}, debugging paused {1}, {2}:{3}",
|
|
853
853
|
lineContent,
|
|
854
854
|
thread && thread.stoppedDetails ? `, reason ${thread.stoppedDetails.reason}` : '',
|
|
@@ -921,7 +921,7 @@ let DebugService = class DebugService {
|
|
|
921
921
|
async addBreakpoints(uri, rawBreakpoints, ariaAnnounce = true) {
|
|
922
922
|
const breakpoints = this.model.addBreakpoints(uri, rawBreakpoints);
|
|
923
923
|
if (ariaAnnounce) {
|
|
924
|
-
breakpoints.forEach(bp => status(( localize(
|
|
924
|
+
breakpoints.forEach(bp => status(( localize(5965, "Added breakpoint, line {0}, file {1}", bp.lineNumber, uri.fsPath))));
|
|
925
925
|
}
|
|
926
926
|
this.debugStorage.storeBreakpoints(this.model);
|
|
927
927
|
await this.sendBreakpoints(uri);
|
|
@@ -943,7 +943,7 @@ let DebugService = class DebugService {
|
|
|
943
943
|
const breakpoints = this.model.getBreakpoints();
|
|
944
944
|
const toRemove = breakpoints.filter(bp => !id || bp.getId() === id);
|
|
945
945
|
toRemove.forEach(bp => status(( localize(
|
|
946
|
-
|
|
946
|
+
5966,
|
|
947
947
|
"Removed breakpoint, line {0}, file {1}",
|
|
948
948
|
bp.lineNumber,
|
|
949
949
|
bp.uri.fsPath
|
|
@@ -22,6 +22,7 @@ import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
22
22
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
23
23
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
24
24
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
25
|
+
import { FocusMode } from '@codingame/monaco-vscode-6c0f93b9-169c-58c3-a9cb-7d60698eb52c-common/vscode/vs/platform/native/common/native';
|
|
25
26
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
26
27
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
27
28
|
import { TelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
@@ -290,7 +291,7 @@ let DebugSession = class DebugSession {
|
|
|
290
291
|
}
|
|
291
292
|
async launchOrAttach(config) {
|
|
292
293
|
if (!this.raw) {
|
|
293
|
-
throw ( new Error(( localize(
|
|
294
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'launch or attach'))));
|
|
294
295
|
}
|
|
295
296
|
if (this.parentSession && this.parentSession.state === State.Inactive) {
|
|
296
297
|
throw canceled();
|
|
@@ -350,7 +351,7 @@ let DebugSession = class DebugSession {
|
|
|
350
351
|
}
|
|
351
352
|
async restart() {
|
|
352
353
|
if (!this.raw) {
|
|
353
|
-
throw ( new Error(( localize(
|
|
354
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'restart'))));
|
|
354
355
|
}
|
|
355
356
|
this.cancelAllRequests();
|
|
356
357
|
if (this._options.lifecycleManagedByParent && this.parentSession) {
|
|
@@ -362,7 +363,7 @@ let DebugSession = class DebugSession {
|
|
|
362
363
|
}
|
|
363
364
|
async sendBreakpoints(modelUri, breakpointsToSend, sourceModified) {
|
|
364
365
|
if (!this.raw) {
|
|
365
|
-
throw ( new Error(( localize(
|
|
366
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'breakpoints'))));
|
|
366
367
|
}
|
|
367
368
|
if (!this.raw.readyForBreakpoints) {
|
|
368
369
|
return Promise.resolve(undefined);
|
|
@@ -390,7 +391,7 @@ let DebugSession = class DebugSession {
|
|
|
390
391
|
}
|
|
391
392
|
async sendFunctionBreakpoints(fbpts) {
|
|
392
393
|
if (!this.raw) {
|
|
393
|
-
throw ( new Error(( localize(
|
|
394
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'function breakpoints'))));
|
|
394
395
|
}
|
|
395
396
|
if (this.raw.readyForBreakpoints) {
|
|
396
397
|
const response = await this.raw.setFunctionBreakpoints({ breakpoints: ( fbpts.map(bp => bp.toDAP())) });
|
|
@@ -405,7 +406,7 @@ let DebugSession = class DebugSession {
|
|
|
405
406
|
}
|
|
406
407
|
async sendExceptionBreakpoints(exbpts) {
|
|
407
408
|
if (!this.raw) {
|
|
408
|
-
throw ( new Error(( localize(
|
|
409
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'exception breakpoints'))));
|
|
409
410
|
}
|
|
410
411
|
if (this.raw.readyForBreakpoints) {
|
|
411
412
|
const args = this.capabilities.supportsExceptionFilterOptions ? {
|
|
@@ -429,7 +430,7 @@ let DebugSession = class DebugSession {
|
|
|
429
430
|
}
|
|
430
431
|
dataBytesBreakpointInfo(address, bytes) {
|
|
431
432
|
if (this.raw?.capabilities.supportsDataBreakpointBytes === false) {
|
|
432
|
-
throw ( new Error(( localize(
|
|
433
|
+
throw ( new Error(( localize(5968, "Session does not support breakpoints with bytes"))));
|
|
433
434
|
}
|
|
434
435
|
return this._dataBreakpointInfo({ name: address, bytes, asAddress: true });
|
|
435
436
|
}
|
|
@@ -438,17 +439,17 @@ let DebugSession = class DebugSession {
|
|
|
438
439
|
}
|
|
439
440
|
async _dataBreakpointInfo(args) {
|
|
440
441
|
if (!this.raw) {
|
|
441
|
-
throw ( new Error(( localize(
|
|
442
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'data breakpoints info'))));
|
|
442
443
|
}
|
|
443
444
|
if (!this.raw.readyForBreakpoints) {
|
|
444
|
-
throw ( new Error(( localize(
|
|
445
|
+
throw ( new Error(( localize(5969, "Session is not ready for breakpoints"))));
|
|
445
446
|
}
|
|
446
447
|
const response = await this.raw.dataBreakpointInfo(args);
|
|
447
448
|
return response?.body;
|
|
448
449
|
}
|
|
449
450
|
async sendDataBreakpoints(dataBreakpoints) {
|
|
450
451
|
if (!this.raw) {
|
|
451
|
-
throw ( new Error(( localize(
|
|
452
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'data breakpoints'))));
|
|
452
453
|
}
|
|
453
454
|
if (this.raw.readyForBreakpoints) {
|
|
454
455
|
const converted = await Promise.all(( dataBreakpoints.map(async (bp) => {
|
|
@@ -479,7 +480,7 @@ let DebugSession = class DebugSession {
|
|
|
479
480
|
async sendInstructionBreakpoints(instructionBreakpoints) {
|
|
480
481
|
if (!this.raw) {
|
|
481
482
|
throw ( new Error(( localize(
|
|
482
|
-
|
|
483
|
+
5967,
|
|
483
484
|
"No debugger available, can not send '{0}'",
|
|
484
485
|
'instruction breakpoints'
|
|
485
486
|
))));
|
|
@@ -497,7 +498,7 @@ let DebugSession = class DebugSession {
|
|
|
497
498
|
}
|
|
498
499
|
async breakpointsLocations(uri, lineNumber) {
|
|
499
500
|
if (!this.raw) {
|
|
500
|
-
throw ( new Error(( localize(
|
|
501
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'breakpoints locations'))));
|
|
501
502
|
}
|
|
502
503
|
const source = this.getRawSource(uri);
|
|
503
504
|
const response = await this.raw.breakpointLocations({ source, line: lineNumber });
|
|
@@ -512,20 +513,20 @@ let DebugSession = class DebugSession {
|
|
|
512
513
|
}
|
|
513
514
|
customRequest(request, args) {
|
|
514
515
|
if (!this.raw) {
|
|
515
|
-
throw ( new Error(( localize(
|
|
516
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", request))));
|
|
516
517
|
}
|
|
517
518
|
return this.raw.custom(request, args);
|
|
518
519
|
}
|
|
519
520
|
stackTrace(threadId, startFrame, levels, token) {
|
|
520
521
|
if (!this.raw) {
|
|
521
|
-
throw ( new Error(( localize(
|
|
522
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'stackTrace'))));
|
|
522
523
|
}
|
|
523
524
|
const sessionToken = this.getNewCancellationToken(threadId, token);
|
|
524
525
|
return this.raw.stackTrace({ threadId, startFrame, levels }, sessionToken);
|
|
525
526
|
}
|
|
526
527
|
async exceptionInfo(threadId) {
|
|
527
528
|
if (!this.raw) {
|
|
528
|
-
throw ( new Error(( localize(
|
|
529
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'exceptionInfo'))));
|
|
529
530
|
}
|
|
530
531
|
const response = await this.raw.exceptionInfo({ threadId });
|
|
531
532
|
if (response) {
|
|
@@ -540,28 +541,28 @@ let DebugSession = class DebugSession {
|
|
|
540
541
|
}
|
|
541
542
|
scopes(frameId, threadId) {
|
|
542
543
|
if (!this.raw) {
|
|
543
|
-
throw ( new Error(( localize(
|
|
544
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'scopes'))));
|
|
544
545
|
}
|
|
545
546
|
const token = this.getNewCancellationToken(threadId);
|
|
546
547
|
return this.raw.scopes({ frameId }, token);
|
|
547
548
|
}
|
|
548
549
|
variables(variablesReference, threadId, filter, start, count) {
|
|
549
550
|
if (!this.raw) {
|
|
550
|
-
throw ( new Error(( localize(
|
|
551
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'variables'))));
|
|
551
552
|
}
|
|
552
553
|
const token = threadId ? this.getNewCancellationToken(threadId) : undefined;
|
|
553
554
|
return this.raw.variables({ variablesReference, filter, start, count }, token);
|
|
554
555
|
}
|
|
555
556
|
evaluate(expression, frameId, context, location) {
|
|
556
557
|
if (!this.raw) {
|
|
557
|
-
throw ( new Error(( localize(
|
|
558
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'evaluate'))));
|
|
558
559
|
}
|
|
559
560
|
return this.raw.evaluate({ expression, frameId, context, line: location?.line, column: location?.column, source: location?.source });
|
|
560
561
|
}
|
|
561
562
|
async restartFrame(frameId, threadId) {
|
|
562
563
|
await this.waitForTriggeredBreakpoints();
|
|
563
564
|
if (!this.raw) {
|
|
564
|
-
throw ( new Error(( localize(
|
|
565
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'restartFrame'))));
|
|
565
566
|
}
|
|
566
567
|
await this.raw.restartFrame({ frameId }, threadId);
|
|
567
568
|
}
|
|
@@ -574,7 +575,7 @@ let DebugSession = class DebugSession {
|
|
|
574
575
|
async next(threadId, granularity) {
|
|
575
576
|
await this.waitForTriggeredBreakpoints();
|
|
576
577
|
if (!this.raw) {
|
|
577
|
-
throw ( new Error(( localize(
|
|
578
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'next'))));
|
|
578
579
|
}
|
|
579
580
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
580
581
|
await this.raw.next({ threadId, granularity });
|
|
@@ -582,7 +583,7 @@ let DebugSession = class DebugSession {
|
|
|
582
583
|
async stepIn(threadId, targetId, granularity) {
|
|
583
584
|
await this.waitForTriggeredBreakpoints();
|
|
584
585
|
if (!this.raw) {
|
|
585
|
-
throw ( new Error(( localize(
|
|
586
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'stepIn'))));
|
|
586
587
|
}
|
|
587
588
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
588
589
|
await this.raw.stepIn({ threadId, targetId, granularity });
|
|
@@ -590,7 +591,7 @@ let DebugSession = class DebugSession {
|
|
|
590
591
|
async stepOut(threadId, granularity) {
|
|
591
592
|
await this.waitForTriggeredBreakpoints();
|
|
592
593
|
if (!this.raw) {
|
|
593
|
-
throw ( new Error(( localize(
|
|
594
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'stepOut'))));
|
|
594
595
|
}
|
|
595
596
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
596
597
|
await this.raw.stepOut({ threadId, granularity });
|
|
@@ -598,7 +599,7 @@ let DebugSession = class DebugSession {
|
|
|
598
599
|
async stepBack(threadId, granularity) {
|
|
599
600
|
await this.waitForTriggeredBreakpoints();
|
|
600
601
|
if (!this.raw) {
|
|
601
|
-
throw ( new Error(( localize(
|
|
602
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'stepBack'))));
|
|
602
603
|
}
|
|
603
604
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
604
605
|
await this.raw.stepBack({ threadId, granularity });
|
|
@@ -606,56 +607,56 @@ let DebugSession = class DebugSession {
|
|
|
606
607
|
async continue(threadId) {
|
|
607
608
|
await this.waitForTriggeredBreakpoints();
|
|
608
609
|
if (!this.raw) {
|
|
609
|
-
throw ( new Error(( localize(
|
|
610
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'continue'))));
|
|
610
611
|
}
|
|
611
612
|
await this.raw.continue({ threadId });
|
|
612
613
|
}
|
|
613
614
|
async reverseContinue(threadId) {
|
|
614
615
|
await this.waitForTriggeredBreakpoints();
|
|
615
616
|
if (!this.raw) {
|
|
616
|
-
throw ( new Error(( localize(
|
|
617
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'reverse continue'))));
|
|
617
618
|
}
|
|
618
619
|
await this.raw.reverseContinue({ threadId });
|
|
619
620
|
}
|
|
620
621
|
async pause(threadId) {
|
|
621
622
|
if (!this.raw) {
|
|
622
|
-
throw ( new Error(( localize(
|
|
623
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'pause'))));
|
|
623
624
|
}
|
|
624
625
|
await this.raw.pause({ threadId });
|
|
625
626
|
}
|
|
626
627
|
async terminateThreads(threadIds) {
|
|
627
628
|
if (!this.raw) {
|
|
628
|
-
throw ( new Error(( localize(
|
|
629
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'terminateThreads'))));
|
|
629
630
|
}
|
|
630
631
|
await this.raw.terminateThreads({ threadIds });
|
|
631
632
|
}
|
|
632
633
|
setVariable(variablesReference, name, value) {
|
|
633
634
|
if (!this.raw) {
|
|
634
|
-
throw ( new Error(( localize(
|
|
635
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'setVariable'))));
|
|
635
636
|
}
|
|
636
637
|
return this.raw.setVariable({ variablesReference, name, value });
|
|
637
638
|
}
|
|
638
639
|
setExpression(frameId, expression, value) {
|
|
639
640
|
if (!this.raw) {
|
|
640
|
-
throw ( new Error(( localize(
|
|
641
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'setExpression'))));
|
|
641
642
|
}
|
|
642
643
|
return this.raw.setExpression({ expression, value, frameId });
|
|
643
644
|
}
|
|
644
645
|
gotoTargets(source, line, column) {
|
|
645
646
|
if (!this.raw) {
|
|
646
|
-
throw ( new Error(( localize(
|
|
647
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'gotoTargets'))));
|
|
647
648
|
}
|
|
648
649
|
return this.raw.gotoTargets({ source, line, column });
|
|
649
650
|
}
|
|
650
651
|
goto(threadId, targetId) {
|
|
651
652
|
if (!this.raw) {
|
|
652
|
-
throw ( new Error(( localize(
|
|
653
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'goto'))));
|
|
653
654
|
}
|
|
654
655
|
return this.raw.goto({ threadId, targetId });
|
|
655
656
|
}
|
|
656
657
|
loadSource(resource) {
|
|
657
658
|
if (!this.raw) {
|
|
658
|
-
return Promise.reject(( new Error(( localize(
|
|
659
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'loadSource')))));
|
|
659
660
|
}
|
|
660
661
|
const source = this.getSourceForUri(resource);
|
|
661
662
|
let rawSource;
|
|
@@ -670,7 +671,7 @@ let DebugSession = class DebugSession {
|
|
|
670
671
|
}
|
|
671
672
|
async getLoadedSources() {
|
|
672
673
|
if (!this.raw) {
|
|
673
|
-
return Promise.reject(( new Error(( localize(
|
|
674
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'getLoadedSources')))));
|
|
674
675
|
}
|
|
675
676
|
const response = await this.raw.loadedSources({});
|
|
676
677
|
if (response?.body && response.body.sources) {
|
|
@@ -682,7 +683,7 @@ let DebugSession = class DebugSession {
|
|
|
682
683
|
}
|
|
683
684
|
async completions(frameId, threadId, text, position, token) {
|
|
684
685
|
if (!this.raw) {
|
|
685
|
-
return Promise.reject(( new Error(( localize(
|
|
686
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'completions')))));
|
|
686
687
|
}
|
|
687
688
|
const sessionCancelationToken = this.getNewCancellationToken(threadId, token);
|
|
688
689
|
return this.raw.completions({
|
|
@@ -694,43 +695,43 @@ let DebugSession = class DebugSession {
|
|
|
694
695
|
}
|
|
695
696
|
async stepInTargets(frameId) {
|
|
696
697
|
if (!this.raw) {
|
|
697
|
-
return Promise.reject(( new Error(( localize(
|
|
698
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'stepInTargets')))));
|
|
698
699
|
}
|
|
699
700
|
const response = await this.raw.stepInTargets({ frameId });
|
|
700
701
|
return response?.body.targets;
|
|
701
702
|
}
|
|
702
703
|
async cancel(progressId) {
|
|
703
704
|
if (!this.raw) {
|
|
704
|
-
return Promise.reject(( new Error(( localize(
|
|
705
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'cancel')))));
|
|
705
706
|
}
|
|
706
707
|
return this.raw.cancel({ progressId });
|
|
707
708
|
}
|
|
708
709
|
async disassemble(memoryReference, offset, instructionOffset, instructionCount) {
|
|
709
710
|
if (!this.raw) {
|
|
710
|
-
return Promise.reject(( new Error(( localize(
|
|
711
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'disassemble')))));
|
|
711
712
|
}
|
|
712
713
|
const response = await this.raw.disassemble({ memoryReference, offset, instructionOffset, instructionCount, resolveSymbols: true });
|
|
713
714
|
return response?.body?.instructions;
|
|
714
715
|
}
|
|
715
716
|
readMemory(memoryReference, offset, count) {
|
|
716
717
|
if (!this.raw) {
|
|
717
|
-
return Promise.reject(( new Error(( localize(
|
|
718
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'readMemory')))));
|
|
718
719
|
}
|
|
719
720
|
return this.raw.readMemory({ count, memoryReference, offset });
|
|
720
721
|
}
|
|
721
722
|
writeMemory(memoryReference, offset, data, allowPartial) {
|
|
722
723
|
if (!this.raw) {
|
|
723
|
-
return Promise.reject(( new Error(( localize(
|
|
724
|
+
return Promise.reject(( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'disassemble')))));
|
|
724
725
|
}
|
|
725
726
|
return this.raw.writeMemory({ memoryReference, offset, allowPartial, data });
|
|
726
727
|
}
|
|
727
728
|
async resolveLocationReference(locationReference) {
|
|
728
729
|
if (!this.raw) {
|
|
729
|
-
throw ( new Error(( localize(
|
|
730
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'locations'))));
|
|
730
731
|
}
|
|
731
732
|
const location = await this.raw.locations({ locationReference });
|
|
732
733
|
if (!location?.body) {
|
|
733
|
-
throw ( new Error(( localize(
|
|
734
|
+
throw ( new Error(( localize(5967, "No debugger available, can not send '{0}'", 'locations'))));
|
|
734
735
|
}
|
|
735
736
|
const source = this.getSource(location.body.source);
|
|
736
737
|
return { column: 1, ...location.body, source };
|
|
@@ -842,8 +843,8 @@ let DebugSession = class DebugSession {
|
|
|
842
843
|
}
|
|
843
844
|
this.rawListeners.add(this.raw.onDidInitialize(async () => {
|
|
844
845
|
status(this.configuration.noDebug
|
|
845
|
-
? ( localize(
|
|
846
|
-
: ( localize(
|
|
846
|
+
? ( localize(5970, "Started running without debugging."))
|
|
847
|
+
: ( localize(5971, "Debugging started.")));
|
|
847
848
|
const sendConfigurationDone = async () => {
|
|
848
849
|
if (this.raw && this.raw.capabilities.supportsConfigurationDoneRequest) {
|
|
849
850
|
try {
|
|
@@ -890,7 +891,7 @@ let DebugSession = class DebugSession {
|
|
|
890
891
|
}
|
|
891
892
|
}));
|
|
892
893
|
this.rawListeners.add(this.raw.onDidTerminateDebugee(async (event) => {
|
|
893
|
-
status(( localize(
|
|
894
|
+
status(( localize(5972, "Debugging stopped.")));
|
|
894
895
|
if (event.body && event.body.restart) {
|
|
895
896
|
await this.debugService.restartSession(this, event.body.restart);
|
|
896
897
|
}
|
|
@@ -1095,7 +1096,7 @@ let DebugSession = class DebugSession {
|
|
|
1095
1096
|
if (this.configurationService.getValue('debug').focusWindowOnBreak && !this.workbenchEnvironmentService.extensionTestsLocationURI) {
|
|
1096
1097
|
const activeWindow = getActiveWindow();
|
|
1097
1098
|
if (!activeWindow.document.hasFocus()) {
|
|
1098
|
-
await this.hostService.focus(mainWindow, {
|
|
1099
|
+
await this.hostService.focus(mainWindow, { mode: FocusMode.Force });
|
|
1099
1100
|
}
|
|
1100
1101
|
}
|
|
1101
1102
|
}
|
|
@@ -50,10 +50,10 @@ let DebugStatusContribution = class DebugStatusContribution {
|
|
|
50
50
|
text = (manager.getLaunches().length > 1 ? `${name} (${manager.selectedConfiguration.launch.name})` : name);
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
|
-
name: ( localize(
|
|
53
|
+
name: ( localize(5976, "Debug")),
|
|
54
54
|
text: '$(debug-alt-small) ' + text,
|
|
55
|
-
ariaLabel: ( localize(
|
|
56
|
-
tooltip: ( localize(
|
|
55
|
+
ariaLabel: ( localize(5977, "Debug: {0}", text)),
|
|
56
|
+
tooltip: ( localize(5978, "Select and Start Debug Configuration")),
|
|
57
57
|
command: 'workbench.action.debug.selectandstart'
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -30,9 +30,9 @@ var TaskRunResult;
|
|
|
30
30
|
TaskRunResult[TaskRunResult["Success"] = 1] = "Success";
|
|
31
31
|
})(TaskRunResult || (TaskRunResult = {}));
|
|
32
32
|
const DEBUG_TASK_ERROR_CHOICE_KEY = 'debug.taskerrorchoice';
|
|
33
|
-
const ABORT_LABEL = ( localize(
|
|
34
|
-
const DEBUG_ANYWAY_LABEL = ( localize(
|
|
35
|
-
const DEBUG_ANYWAY_LABEL_NO_MEMO = ( localize(
|
|
33
|
+
const ABORT_LABEL = ( localize(5979, "Abort"));
|
|
34
|
+
const DEBUG_ANYWAY_LABEL = ( localize(5980, "&&Debug Anyway"));
|
|
35
|
+
const DEBUG_ANYWAY_LABEL_NO_MEMO = ( localize(5981, "Debug Anyway"));
|
|
36
36
|
let DebugTaskRunner = class DebugTaskRunner {
|
|
37
37
|
constructor(taskService, markerService, configurationService, viewsService, dialogService, storageService, commandService, progressService) {
|
|
38
38
|
this.taskService = taskService;
|
|
@@ -74,17 +74,17 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
74
74
|
}
|
|
75
75
|
const taskLabel = typeof taskId === 'string' ? taskId : taskId ? taskId.name : '';
|
|
76
76
|
const message = errorCount > 1
|
|
77
|
-
? ( localize(
|
|
77
|
+
? ( localize(5982, "Errors exist after running preLaunchTask '{0}'.", taskLabel))
|
|
78
78
|
: errorCount === 1
|
|
79
|
-
? ( localize(
|
|
79
|
+
? ( localize(5983, "Error exists after running preLaunchTask '{0}'.", taskLabel))
|
|
80
80
|
: taskSummary && typeof taskSummary.exitCode === 'number'
|
|
81
81
|
? ( localize(
|
|
82
|
-
|
|
82
|
+
5984,
|
|
83
83
|
"The preLaunchTask '{0}' terminated with exit code {1}.",
|
|
84
84
|
taskLabel,
|
|
85
85
|
taskSummary.exitCode
|
|
86
86
|
))
|
|
87
|
-
: ( localize(
|
|
87
|
+
: ( localize(5985, "The preLaunchTask '{0}' terminated.", taskLabel));
|
|
88
88
|
let DebugChoice;
|
|
89
89
|
(function (DebugChoice) {
|
|
90
90
|
DebugChoice[DebugChoice["DebugAnyway"] = 1] = "DebugAnyway";
|
|
@@ -100,7 +100,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
100
100
|
run: () => DebugChoice.DebugAnyway
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
|
-
label: ( localize(
|
|
103
|
+
label: ( localize(5986, "&&Show Errors")),
|
|
104
104
|
run: () => DebugChoice.ShowErrors
|
|
105
105
|
}
|
|
106
106
|
],
|
|
@@ -109,7 +109,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
109
109
|
run: () => DebugChoice.Cancel
|
|
110
110
|
},
|
|
111
111
|
checkbox: {
|
|
112
|
-
label: ( localize(
|
|
112
|
+
label: ( localize(5987, "Remember my choice in user settings")),
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
const debugAnyway = result === DebugChoice.DebugAnyway;
|
|
@@ -145,7 +145,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
145
145
|
message: err.message,
|
|
146
146
|
buttons: [
|
|
147
147
|
{
|
|
148
|
-
label: ( localize(
|
|
148
|
+
label: ( localize(5980, "&&Debug Anyway")),
|
|
149
149
|
run: () => DebugChoice.DebugAnyway
|
|
150
150
|
},
|
|
151
151
|
{
|
|
@@ -157,7 +157,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
157
157
|
run: () => DebugChoice.Cancel
|
|
158
158
|
},
|
|
159
159
|
checkbox: {
|
|
160
|
-
label: ( localize(
|
|
160
|
+
label: ( localize(5988, "Remember my choice for this task"))
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
163
|
choice = result;
|
|
@@ -178,7 +178,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
178
178
|
}
|
|
179
179
|
if (!root) {
|
|
180
180
|
return Promise.reject(( new Error(( localize(
|
|
181
|
-
|
|
181
|
+
5989,
|
|
182
182
|
"Task '{0}' can not be referenced from a launch configuration that is in a different workspace folder.",
|
|
183
183
|
typeof taskId === 'string' ? taskId : taskId.type
|
|
184
184
|
)))));
|
|
@@ -186,8 +186,8 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
186
186
|
const task = await this.taskService.getTask(root, taskId);
|
|
187
187
|
if (!task) {
|
|
188
188
|
const errorMessage = typeof taskId === 'string'
|
|
189
|
-
? ( localize(
|
|
190
|
-
: ( localize(
|
|
189
|
+
? ( localize(5990, "Could not find the task '{0}'.", taskId))
|
|
190
|
+
: ( localize(5991, "Could not find the specified task."));
|
|
191
191
|
return Promise.reject(createErrorWithActions(errorMessage, [( new Action(
|
|
192
192
|
DEBUG_CONFIGURE_COMMAND_ID,
|
|
193
193
|
DEBUG_CONFIGURE_LABEL,
|
|
@@ -245,7 +245,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
245
245
|
store.add(disposableTimeout(() => {
|
|
246
246
|
if (!taskStarted) {
|
|
247
247
|
const errorMessage = ( localize(
|
|
248
|
-
|
|
248
|
+
5992,
|
|
249
249
|
"The task '{0}' has not exited and doesn't have a 'problemMatcher' defined. Make sure to define a problem matcher for watch tasks.",
|
|
250
250
|
typeof taskId === 'string' ? taskId : JSON.stringify(taskId)
|
|
251
251
|
));
|
|
@@ -256,14 +256,14 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
256
256
|
if (!hideSlowPreLaunchWarning) {
|
|
257
257
|
store.add(disposableTimeout(() => {
|
|
258
258
|
const message = ( localize(
|
|
259
|
-
|
|
259
|
+
5993,
|
|
260
260
|
"Waiting for preLaunchTask '{0}'...",
|
|
261
261
|
task.configurationProperties.name
|
|
262
262
|
));
|
|
263
263
|
const buttons = [DEBUG_ANYWAY_LABEL_NO_MEMO, ABORT_LABEL];
|
|
264
264
|
const canConfigure = task instanceof CustomTask || task instanceof ConfiguringTask;
|
|
265
265
|
if (canConfigure) {
|
|
266
|
-
buttons.splice(1, 0, ( localize(
|
|
266
|
+
buttons.splice(1, 0, ( localize(5994, "Configure Task")));
|
|
267
267
|
}
|
|
268
268
|
this.progressService.withProgress({ location: ProgressLocation.Notification, title: message, buttons }, () => result.catch(() => { }), (choice) => {
|
|
269
269
|
if (choice === undefined) ;
|