@codingame/monaco-vscode-debug-service-override 8.0.1 → 8.0.3
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/workbench/contrib/debug/browser/debugAdapterManager.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +21 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +41 -41
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +15 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-debug-service-override",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@8.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.3"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -72,7 +72,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
72
72
|
delta.added.forEach(added => {
|
|
73
73
|
added.value.forEach(rawAdapter => {
|
|
74
74
|
if (!rawAdapter.type || (typeof rawAdapter.type !== 'string')) {
|
|
75
|
-
added.collector.error(( localize(
|
|
75
|
+
added.collector.error(( localize(5738, "Debugger 'type' can not be omitted and must be of type 'string'.")));
|
|
76
76
|
}
|
|
77
77
|
if (rawAdapter.type !== '*') {
|
|
78
78
|
const existing = this.getDebugger(rawAdapter.type);
|
|
@@ -116,7 +116,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
116
116
|
'name': {
|
|
117
117
|
type: 'string',
|
|
118
118
|
description: ( localize(
|
|
119
|
-
|
|
119
|
+
5739,
|
|
120
120
|
"Name of configuration; appears in the launch configuration dropdown menu."
|
|
121
121
|
)),
|
|
122
122
|
default: 'Launch'
|
|
@@ -124,7 +124,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
124
124
|
'debugServer': {
|
|
125
125
|
type: 'number',
|
|
126
126
|
description: ( localize(
|
|
127
|
-
|
|
127
|
+
5740,
|
|
128
128
|
"For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode"
|
|
129
129
|
)),
|
|
130
130
|
default: 4711
|
|
@@ -135,7 +135,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
135
135
|
}],
|
|
136
136
|
default: '',
|
|
137
137
|
defaultSnippets: [{ body: { task: '', type: '' } }],
|
|
138
|
-
description: ( localize(
|
|
138
|
+
description: ( localize(5741, "Task to run before debug session starts."))
|
|
139
139
|
},
|
|
140
140
|
'postDebugTask': {
|
|
141
141
|
anyOf: [taskSchema, {
|
|
@@ -143,14 +143,14 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
143
143
|
}],
|
|
144
144
|
default: '',
|
|
145
145
|
defaultSnippets: [{ body: { task: '', type: '' } }],
|
|
146
|
-
description: ( localize(
|
|
146
|
+
description: ( localize(5742, "Task to run after debug session ends."))
|
|
147
147
|
},
|
|
148
148
|
'presentation': presentationSchema,
|
|
149
149
|
'internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA,
|
|
150
150
|
'suppressMultipleSessionWarning': {
|
|
151
151
|
type: 'boolean',
|
|
152
152
|
description: ( localize(
|
|
153
|
-
|
|
153
|
+
5743,
|
|
154
154
|
"Disable the warning when trying to start the same debug configuration more than once."
|
|
155
155
|
)),
|
|
156
156
|
default: true
|
|
@@ -306,11 +306,11 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
306
306
|
const { confirmed } = await this.dialogService.confirm({
|
|
307
307
|
type: Severity$1.Warning,
|
|
308
308
|
message: ( localize(
|
|
309
|
-
|
|
309
|
+
5744,
|
|
310
310
|
"You don't have an extension for debugging {0}. Should we find a {0} extension in the Marketplace?",
|
|
311
311
|
languageLabel
|
|
312
312
|
)),
|
|
313
|
-
primaryButton: ( localize(
|
|
313
|
+
primaryButton: ( localize(5745, "&&Find {0} extension", languageLabel))
|
|
314
314
|
});
|
|
315
315
|
if (confirmed) {
|
|
316
316
|
await this.commandService.executeCommand('debug.installAdditionalDebuggers', languageLabel);
|
|
@@ -336,7 +336,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
336
336
|
});
|
|
337
337
|
const picks = [];
|
|
338
338
|
if (suggestedCandidates.length > 0) {
|
|
339
|
-
picks.push({ type: 'separator', label: ( localize(
|
|
339
|
+
picks.push({ type: 'separator', label: ( localize(5746, "Suggested")) }, ...( (suggestedCandidates.map(c => ({ label: c.label, debugger: c })))));
|
|
340
340
|
}
|
|
341
341
|
if (otherCandidates.length > 0) {
|
|
342
342
|
if (picks.length > 0) {
|
|
@@ -344,8 +344,8 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
344
344
|
}
|
|
345
345
|
picks.push(...( (otherCandidates.map(c => ({ label: c.label, debugger: c })))));
|
|
346
346
|
}
|
|
347
|
-
picks.push({ type: 'separator', label: '' }, { label: languageLabel ? ( localize(
|
|
348
|
-
const placeHolder = ( localize(
|
|
347
|
+
picks.push({ type: 'separator', label: '' }, { label: languageLabel ? ( localize(5747, "Install an extension for {0}...", languageLabel)) : ( localize(5748, "Install extension...")) });
|
|
348
|
+
const placeHolder = ( localize(5749, "Select debugger"));
|
|
349
349
|
return this.quickInputService.pick(picks, { activeItem: picks[0], placeHolder })
|
|
350
350
|
.then(picked => {
|
|
351
351
|
if (picked && picked.debugger) {
|
|
@@ -191,7 +191,7 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
191
191
|
config,
|
|
192
192
|
buttons: [{
|
|
193
193
|
iconClass: ThemeIcon.asClassName(debugConfigure),
|
|
194
|
-
tooltip: ( localize(
|
|
194
|
+
tooltip: ( localize(5784, "Edit Debug Configuration in launch.json"))
|
|
195
195
|
}],
|
|
196
196
|
launch
|
|
197
197
|
}))))));
|
|
@@ -200,7 +200,7 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
200
200
|
const disposables = ( (new DisposableStore()));
|
|
201
201
|
const input = disposables.add(this.quickInputService.createQuickPick());
|
|
202
202
|
input.busy = true;
|
|
203
|
-
input.placeholder = ( localize(
|
|
203
|
+
input.placeholder = ( localize(5785, "Select Launch Configuration"));
|
|
204
204
|
const chosenPromise = ( (new Promise(resolve => {
|
|
205
205
|
disposables.add(input.onDidAccept(() => resolve(input.activeItems[0])));
|
|
206
206
|
disposables.add(input.onDidTriggerItemButton(async (context) => {
|
|
@@ -522,7 +522,7 @@ let Launch = class Launch extends AbstractLaunch {
|
|
|
522
522
|
}
|
|
523
523
|
catch (error) {
|
|
524
524
|
throw ( (new Error(localize(
|
|
525
|
-
|
|
525
|
+
5786,
|
|
526
526
|
"Unable to create 'launch.json' file inside the '.vscode' folder ({0}).",
|
|
527
527
|
error.message
|
|
528
528
|
))));
|
|
@@ -579,7 +579,7 @@ let WorkspaceLaunch = class WorkspaceLaunch extends AbstractLaunch {
|
|
|
579
579
|
return this.contextService.getWorkspace().configuration;
|
|
580
580
|
}
|
|
581
581
|
get name() {
|
|
582
|
-
return ( localize(
|
|
582
|
+
return ( localize(5787, "workspace"));
|
|
583
583
|
}
|
|
584
584
|
getConfig() {
|
|
585
585
|
return this.configurationService.inspect('launch').workspaceValue;
|
|
@@ -623,7 +623,7 @@ let UserLaunch = class UserLaunch extends AbstractLaunch {
|
|
|
623
623
|
return this.preferencesService.userSettingsResource;
|
|
624
624
|
}
|
|
625
625
|
get name() {
|
|
626
|
-
return ( localize(
|
|
626
|
+
return ( localize(5788, "user settings"));
|
|
627
627
|
}
|
|
628
628
|
get hidden() {
|
|
629
629
|
return true;
|
|
@@ -138,7 +138,7 @@ let DebugService = class DebugService {
|
|
|
138
138
|
if (numberOfSessions > 0) {
|
|
139
139
|
const viewContainer = this.viewDescriptorService.getViewContainerByViewId(CALLSTACK_VIEW_ID);
|
|
140
140
|
if (viewContainer) {
|
|
141
|
-
this.activity = this.activityService.showViewContainerActivity(viewContainer.id, { badge: ( (new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(
|
|
141
|
+
this.activity = this.activityService.showViewContainerActivity(viewContainer.id, { badge: ( (new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(2554, "1 active session")) : ( localize(2555, "{0} active sessions", n))))) });
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}));
|
|
@@ -160,7 +160,7 @@ let DebugService = class DebugService {
|
|
|
160
160
|
}
|
|
161
161
|
}));
|
|
162
162
|
this.disposables.add(extensionService.onWillStop(evt => {
|
|
163
|
-
evt.veto(this.model.getSessions().length > 0, ( localize(
|
|
163
|
+
evt.veto(this.model.getSessions().length > 0, ( localize(2556, 'A debug session is still running.')));
|
|
164
164
|
}));
|
|
165
165
|
this.initContextKeys(contextKeyService);
|
|
166
166
|
}
|
|
@@ -269,8 +269,8 @@ let DebugService = class DebugService {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
async startDebugging(launch, configOrName, options, saveBeforeStart = !options?.parentSession) {
|
|
272
|
-
const message = options && options.noDebug ? ( localize(
|
|
273
|
-
|
|
272
|
+
const message = options && options.noDebug ? ( localize(2557, "Running executes build tasks and program code from your workspace.")) : ( localize(
|
|
273
|
+
2558,
|
|
274
274
|
"Debugging executes build tasks and program code from your workspace."
|
|
275
275
|
));
|
|
276
276
|
const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({ message });
|
|
@@ -301,7 +301,7 @@ let DebugService = class DebugService {
|
|
|
301
301
|
if (compound) {
|
|
302
302
|
if (!compound.configurations) {
|
|
303
303
|
throw ( (new Error(localize(
|
|
304
|
-
|
|
304
|
+
2559,
|
|
305
305
|
"Compound must have \"configurations\" attribute set in order to start multiple configurations."
|
|
306
306
|
))));
|
|
307
307
|
}
|
|
@@ -331,9 +331,9 @@ let DebugService = class DebugService {
|
|
|
331
331
|
}
|
|
332
332
|
else {
|
|
333
333
|
throw ( (new Error(
|
|
334
|
-
launchesContainingName.length === 0 ? localize(
|
|
334
|
+
launchesContainingName.length === 0 ? localize(2560, "Could not find launch configuration '{0}' in the workspace.", name)
|
|
335
335
|
: localize(
|
|
336
|
-
|
|
336
|
+
2561,
|
|
337
337
|
"There are multiple launch configurations '{0}' in the workspace. Use folder name to qualify the configuration.",
|
|
338
338
|
name
|
|
339
339
|
)
|
|
@@ -347,7 +347,7 @@ let DebugService = class DebugService {
|
|
|
347
347
|
}
|
|
348
348
|
else {
|
|
349
349
|
throw ( (new Error(localize(
|
|
350
|
-
|
|
350
|
+
2562,
|
|
351
351
|
"Can not find folder with name '{0}' for configuration '{1}' in compound '{2}'.",
|
|
352
352
|
configData.folder,
|
|
353
353
|
configData.name,
|
|
@@ -363,11 +363,11 @@ let DebugService = class DebugService {
|
|
|
363
363
|
}
|
|
364
364
|
if (configOrName && !config) {
|
|
365
365
|
const message = !!launch ? ( localize(
|
|
366
|
-
|
|
366
|
+
2563,
|
|
367
367
|
"Configuration '{0}' is missing in 'launch.json'.",
|
|
368
368
|
typeof configOrName === 'string' ? configOrName : configOrName.name
|
|
369
369
|
)) :
|
|
370
|
-
( localize(
|
|
370
|
+
( localize(2564, "'launch.json' does not exist for passed workspace folder."));
|
|
371
371
|
throw ( (new Error(message)));
|
|
372
372
|
}
|
|
373
373
|
const result = await this.createSession(launch, config, options);
|
|
@@ -440,23 +440,23 @@ let DebugService = class DebugService {
|
|
|
440
440
|
let message;
|
|
441
441
|
if (configByProviders.request !== 'attach' && configByProviders.request !== 'launch') {
|
|
442
442
|
message = configByProviders.request ? ( localize(
|
|
443
|
-
|
|
443
|
+
2565,
|
|
444
444
|
"Attribute '{0}' has an unsupported value '{1}' in the chosen debug configuration.",
|
|
445
445
|
'request',
|
|
446
446
|
configByProviders.request
|
|
447
447
|
))
|
|
448
448
|
: ( localize(
|
|
449
|
-
|
|
449
|
+
2566,
|
|
450
450
|
"Attribute '{0}' is missing from the chosen debug configuration.",
|
|
451
451
|
'request'
|
|
452
452
|
));
|
|
453
453
|
}
|
|
454
454
|
else {
|
|
455
|
-
message = resolvedConfig.type ? ( localize(
|
|
456
|
-
( localize(
|
|
455
|
+
message = resolvedConfig.type ? ( localize(2567, "Configured debug type '{0}' is not supported.", resolvedConfig.type)) :
|
|
456
|
+
( localize(2568, "Missing property 'type' for the chosen launch configuration."));
|
|
457
457
|
}
|
|
458
458
|
const actionList = [];
|
|
459
|
-
actionList.push(( (new Action('installAdditionalDebuggers', ( localize(
|
|
459
|
+
actionList.push(( (new Action('installAdditionalDebuggers', ( localize(2569, "Install {0} Extension", resolvedConfig.type)), undefined, true, async () => this.commandService.executeCommand('debug.installAdditionalDebuggers', resolvedConfig?.type)))));
|
|
460
460
|
await this.showError(message, actionList);
|
|
461
461
|
return false;
|
|
462
462
|
}
|
|
@@ -477,7 +477,7 @@ let DebugService = class DebugService {
|
|
|
477
477
|
}
|
|
478
478
|
else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
|
|
479
479
|
await this.showError(( localize(
|
|
480
|
-
|
|
480
|
+
2570,
|
|
481
481
|
"The active file can not be debugged. Make sure it is saved and that you have a debug extension installed for that file type."
|
|
482
482
|
)));
|
|
483
483
|
}
|
|
@@ -496,7 +496,7 @@ let DebugService = class DebugService {
|
|
|
496
496
|
const session = this.instantiationService.createInstance(DebugSession, sessionId, configuration, root, this.model, options);
|
|
497
497
|
if (options?.startedByUser && ( (this.model.getSessions().some(s => s.getLabel() === session.getLabel()))) && configuration.resolved.suppressMultipleSessionWarning !== true) {
|
|
498
498
|
const result = await this.dialogService.confirm({ message: ( localize(
|
|
499
|
-
|
|
499
|
+
2571,
|
|
500
500
|
"'{0}' is already running. Do you want to start another instance?",
|
|
501
501
|
session.getLabel()
|
|
502
502
|
)) });
|
|
@@ -587,7 +587,7 @@ let DebugService = class DebugService {
|
|
|
587
587
|
if (adapterExitEvent) {
|
|
588
588
|
if (adapterExitEvent.error) {
|
|
589
589
|
this.notificationService.error(( localize(
|
|
590
|
-
|
|
590
|
+
2572,
|
|
591
591
|
"Debug adapter process has terminated unexpectedly ({0})",
|
|
592
592
|
adapterExitEvent.error.message || ( (adapterExitEvent.error.toString()))
|
|
593
593
|
)));
|
|
@@ -830,7 +830,7 @@ let DebugService = class DebugService {
|
|
|
830
830
|
if (lineNumber >= 1 && lineNumber <= model.getLineCount()) {
|
|
831
831
|
const lineContent = control.getModel().getLineContent(lineNumber);
|
|
832
832
|
alert(( localize(
|
|
833
|
-
|
|
833
|
+
2573,
|
|
834
834
|
"{0}, debugging paused {1}, {2}:{3}",
|
|
835
835
|
lineContent,
|
|
836
836
|
thread && thread.stoppedDetails ? `, reason ${thread.stoppedDetails.reason}` : '',
|
|
@@ -903,7 +903,7 @@ let DebugService = class DebugService {
|
|
|
903
903
|
async addBreakpoints(uri, rawBreakpoints, ariaAnnounce = true) {
|
|
904
904
|
const breakpoints = this.model.addBreakpoints(uri, rawBreakpoints);
|
|
905
905
|
if (ariaAnnounce) {
|
|
906
|
-
breakpoints.forEach(bp => status(( localize(
|
|
906
|
+
breakpoints.forEach(bp => status(( localize(2574, "Added breakpoint, line {0}, file {1}", bp.lineNumber, uri.fsPath))));
|
|
907
907
|
}
|
|
908
908
|
this.debugStorage.storeBreakpoints(this.model);
|
|
909
909
|
await this.sendBreakpoints(uri);
|
|
@@ -925,7 +925,7 @@ let DebugService = class DebugService {
|
|
|
925
925
|
const breakpoints = this.model.getBreakpoints();
|
|
926
926
|
const toRemove = breakpoints.filter(bp => !id || bp.getId() === id);
|
|
927
927
|
toRemove.forEach(bp => status(( localize(
|
|
928
|
-
|
|
928
|
+
2575,
|
|
929
929
|
"Removed breakpoint, line {0}, file {1}",
|
|
930
930
|
bp.lineNumber,
|
|
931
931
|
bp.uri.fsPath
|
|
@@ -290,7 +290,7 @@ let DebugSession = class DebugSession {
|
|
|
290
290
|
async launchOrAttach(config) {
|
|
291
291
|
if (!this.raw) {
|
|
292
292
|
throw ( (new Error(
|
|
293
|
-
localize(
|
|
293
|
+
localize(5789, "No debugger available, can not send '{0}'", 'launch or attach')
|
|
294
294
|
)));
|
|
295
295
|
}
|
|
296
296
|
if (this.parentSession && this.parentSession.state === State.Inactive) {
|
|
@@ -346,7 +346,7 @@ let DebugSession = class DebugSession {
|
|
|
346
346
|
}
|
|
347
347
|
async restart() {
|
|
348
348
|
if (!this.raw) {
|
|
349
|
-
throw ( (new Error(localize(
|
|
349
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'restart'))));
|
|
350
350
|
}
|
|
351
351
|
this.cancelAllRequests();
|
|
352
352
|
if (this._options.lifecycleManagedByParent && this.parentSession) {
|
|
@@ -358,7 +358,7 @@ let DebugSession = class DebugSession {
|
|
|
358
358
|
}
|
|
359
359
|
async sendBreakpoints(modelUri, breakpointsToSend, sourceModified) {
|
|
360
360
|
if (!this.raw) {
|
|
361
|
-
throw ( (new Error(localize(
|
|
361
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'breakpoints'))));
|
|
362
362
|
}
|
|
363
363
|
if (!this.raw.readyForBreakpoints) {
|
|
364
364
|
return Promise.resolve(undefined);
|
|
@@ -387,7 +387,7 @@ let DebugSession = class DebugSession {
|
|
|
387
387
|
async sendFunctionBreakpoints(fbpts) {
|
|
388
388
|
if (!this.raw) {
|
|
389
389
|
throw ( (new Error(
|
|
390
|
-
localize(
|
|
390
|
+
localize(5789, "No debugger available, can not send '{0}'", 'function breakpoints')
|
|
391
391
|
)));
|
|
392
392
|
}
|
|
393
393
|
if (this.raw.readyForBreakpoints) {
|
|
@@ -404,7 +404,7 @@ let DebugSession = class DebugSession {
|
|
|
404
404
|
async sendExceptionBreakpoints(exbpts) {
|
|
405
405
|
if (!this.raw) {
|
|
406
406
|
throw ( (new Error(
|
|
407
|
-
localize(
|
|
407
|
+
localize(5789, "No debugger available, can not send '{0}'", 'exception breakpoints')
|
|
408
408
|
)));
|
|
409
409
|
}
|
|
410
410
|
if (this.raw.readyForBreakpoints) {
|
|
@@ -429,7 +429,7 @@ let DebugSession = class DebugSession {
|
|
|
429
429
|
}
|
|
430
430
|
dataBytesBreakpointInfo(address, bytes) {
|
|
431
431
|
if (this.raw?.capabilities.supportsDataBreakpointBytes === false) {
|
|
432
|
-
throw ( (new Error(localize(
|
|
432
|
+
throw ( (new Error(localize(5790, "Session does not support breakpoints with bytes"))));
|
|
433
433
|
}
|
|
434
434
|
return this._dataBreakpointInfo({ name: address, bytes, asAddress: true });
|
|
435
435
|
}
|
|
@@ -439,11 +439,11 @@ let DebugSession = class DebugSession {
|
|
|
439
439
|
async _dataBreakpointInfo(args) {
|
|
440
440
|
if (!this.raw) {
|
|
441
441
|
throw ( (new Error(
|
|
442
|
-
localize(
|
|
442
|
+
localize(5789, "No debugger available, can not send '{0}'", 'data breakpoints info')
|
|
443
443
|
)));
|
|
444
444
|
}
|
|
445
445
|
if (!this.raw.readyForBreakpoints) {
|
|
446
|
-
throw ( (new Error(localize(
|
|
446
|
+
throw ( (new Error(localize(5791, "Session is not ready for breakpoints"))));
|
|
447
447
|
}
|
|
448
448
|
const response = await this.raw.dataBreakpointInfo(args);
|
|
449
449
|
return response?.body;
|
|
@@ -451,7 +451,7 @@ let DebugSession = class DebugSession {
|
|
|
451
451
|
async sendDataBreakpoints(dataBreakpoints) {
|
|
452
452
|
if (!this.raw) {
|
|
453
453
|
throw ( (new Error(
|
|
454
|
-
localize(
|
|
454
|
+
localize(5789, "No debugger available, can not send '{0}'", 'data breakpoints')
|
|
455
455
|
)));
|
|
456
456
|
}
|
|
457
457
|
if (this.raw.readyForBreakpoints) {
|
|
@@ -483,7 +483,7 @@ let DebugSession = class DebugSession {
|
|
|
483
483
|
async sendInstructionBreakpoints(instructionBreakpoints) {
|
|
484
484
|
if (!this.raw) {
|
|
485
485
|
throw ( (new Error(localize(
|
|
486
|
-
|
|
486
|
+
5789,
|
|
487
487
|
"No debugger available, can not send '{0}'",
|
|
488
488
|
'instruction breakpoints'
|
|
489
489
|
))));
|
|
@@ -502,7 +502,7 @@ let DebugSession = class DebugSession {
|
|
|
502
502
|
async breakpointsLocations(uri, lineNumber) {
|
|
503
503
|
if (!this.raw) {
|
|
504
504
|
throw ( (new Error(
|
|
505
|
-
localize(
|
|
505
|
+
localize(5789, "No debugger available, can not send '{0}'", 'breakpoints locations')
|
|
506
506
|
)));
|
|
507
507
|
}
|
|
508
508
|
const source = this.getRawSource(uri);
|
|
@@ -518,13 +518,13 @@ let DebugSession = class DebugSession {
|
|
|
518
518
|
}
|
|
519
519
|
customRequest(request, args) {
|
|
520
520
|
if (!this.raw) {
|
|
521
|
-
throw ( (new Error(localize(
|
|
521
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", request))));
|
|
522
522
|
}
|
|
523
523
|
return this.raw.custom(request, args);
|
|
524
524
|
}
|
|
525
525
|
stackTrace(threadId, startFrame, levels, token) {
|
|
526
526
|
if (!this.raw) {
|
|
527
|
-
throw ( (new Error(localize(
|
|
527
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'stackTrace'))));
|
|
528
528
|
}
|
|
529
529
|
const sessionToken = this.getNewCancellationToken(threadId, token);
|
|
530
530
|
return this.raw.stackTrace({ threadId, startFrame, levels }, sessionToken);
|
|
@@ -532,7 +532,7 @@ let DebugSession = class DebugSession {
|
|
|
532
532
|
async exceptionInfo(threadId) {
|
|
533
533
|
if (!this.raw) {
|
|
534
534
|
throw ( (new Error(
|
|
535
|
-
localize(
|
|
535
|
+
localize(5789, "No debugger available, can not send '{0}'", 'exceptionInfo')
|
|
536
536
|
)));
|
|
537
537
|
}
|
|
538
538
|
const response = await this.raw.exceptionInfo({ threadId });
|
|
@@ -548,21 +548,21 @@ let DebugSession = class DebugSession {
|
|
|
548
548
|
}
|
|
549
549
|
scopes(frameId, threadId) {
|
|
550
550
|
if (!this.raw) {
|
|
551
|
-
throw ( (new Error(localize(
|
|
551
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'scopes'))));
|
|
552
552
|
}
|
|
553
553
|
const token = this.getNewCancellationToken(threadId);
|
|
554
554
|
return this.raw.scopes({ frameId }, token);
|
|
555
555
|
}
|
|
556
556
|
variables(variablesReference, threadId, filter, start, count) {
|
|
557
557
|
if (!this.raw) {
|
|
558
|
-
throw ( (new Error(localize(
|
|
558
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'variables'))));
|
|
559
559
|
}
|
|
560
560
|
const token = threadId ? this.getNewCancellationToken(threadId) : undefined;
|
|
561
561
|
return this.raw.variables({ variablesReference, filter, start, count }, token);
|
|
562
562
|
}
|
|
563
563
|
evaluate(expression, frameId, context, location) {
|
|
564
564
|
if (!this.raw) {
|
|
565
|
-
throw ( (new Error(localize(
|
|
565
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'evaluate'))));
|
|
566
566
|
}
|
|
567
567
|
return this.raw.evaluate({ expression, frameId, context, line: location?.line, column: location?.column, source: location?.source });
|
|
568
568
|
}
|
|
@@ -570,7 +570,7 @@ let DebugSession = class DebugSession {
|
|
|
570
570
|
await this.waitForTriggeredBreakpoints();
|
|
571
571
|
if (!this.raw) {
|
|
572
572
|
throw ( (new Error(
|
|
573
|
-
localize(
|
|
573
|
+
localize(5789, "No debugger available, can not send '{0}'", 'restartFrame')
|
|
574
574
|
)));
|
|
575
575
|
}
|
|
576
576
|
await this.raw.restartFrame({ frameId }, threadId);
|
|
@@ -584,7 +584,7 @@ let DebugSession = class DebugSession {
|
|
|
584
584
|
async next(threadId, granularity) {
|
|
585
585
|
await this.waitForTriggeredBreakpoints();
|
|
586
586
|
if (!this.raw) {
|
|
587
|
-
throw ( (new Error(localize(
|
|
587
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'next'))));
|
|
588
588
|
}
|
|
589
589
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
590
590
|
await this.raw.next({ threadId, granularity });
|
|
@@ -592,7 +592,7 @@ let DebugSession = class DebugSession {
|
|
|
592
592
|
async stepIn(threadId, targetId, granularity) {
|
|
593
593
|
await this.waitForTriggeredBreakpoints();
|
|
594
594
|
if (!this.raw) {
|
|
595
|
-
throw ( (new Error(localize(
|
|
595
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'stepIn'))));
|
|
596
596
|
}
|
|
597
597
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
598
598
|
await this.raw.stepIn({ threadId, targetId, granularity });
|
|
@@ -600,7 +600,7 @@ let DebugSession = class DebugSession {
|
|
|
600
600
|
async stepOut(threadId, granularity) {
|
|
601
601
|
await this.waitForTriggeredBreakpoints();
|
|
602
602
|
if (!this.raw) {
|
|
603
|
-
throw ( (new Error(localize(
|
|
603
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'stepOut'))));
|
|
604
604
|
}
|
|
605
605
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
606
606
|
await this.raw.stepOut({ threadId, granularity });
|
|
@@ -608,7 +608,7 @@ let DebugSession = class DebugSession {
|
|
|
608
608
|
async stepBack(threadId, granularity) {
|
|
609
609
|
await this.waitForTriggeredBreakpoints();
|
|
610
610
|
if (!this.raw) {
|
|
611
|
-
throw ( (new Error(localize(
|
|
611
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'stepBack'))));
|
|
612
612
|
}
|
|
613
613
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
614
614
|
await this.raw.stepBack({ threadId, granularity });
|
|
@@ -616,7 +616,7 @@ let DebugSession = class DebugSession {
|
|
|
616
616
|
async continue(threadId) {
|
|
617
617
|
await this.waitForTriggeredBreakpoints();
|
|
618
618
|
if (!this.raw) {
|
|
619
|
-
throw ( (new Error(localize(
|
|
619
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'continue'))));
|
|
620
620
|
}
|
|
621
621
|
await this.raw.continue({ threadId });
|
|
622
622
|
}
|
|
@@ -624,54 +624,54 @@ let DebugSession = class DebugSession {
|
|
|
624
624
|
await this.waitForTriggeredBreakpoints();
|
|
625
625
|
if (!this.raw) {
|
|
626
626
|
throw ( (new Error(
|
|
627
|
-
localize(
|
|
627
|
+
localize(5789, "No debugger available, can not send '{0}'", 'reverse continue')
|
|
628
628
|
)));
|
|
629
629
|
}
|
|
630
630
|
await this.raw.reverseContinue({ threadId });
|
|
631
631
|
}
|
|
632
632
|
async pause(threadId) {
|
|
633
633
|
if (!this.raw) {
|
|
634
|
-
throw ( (new Error(localize(
|
|
634
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'pause'))));
|
|
635
635
|
}
|
|
636
636
|
await this.raw.pause({ threadId });
|
|
637
637
|
}
|
|
638
638
|
async terminateThreads(threadIds) {
|
|
639
639
|
if (!this.raw) {
|
|
640
640
|
throw ( (new Error(
|
|
641
|
-
localize(
|
|
641
|
+
localize(5789, "No debugger available, can not send '{0}'", 'terminateThreads')
|
|
642
642
|
)));
|
|
643
643
|
}
|
|
644
644
|
await this.raw.terminateThreads({ threadIds });
|
|
645
645
|
}
|
|
646
646
|
setVariable(variablesReference, name, value) {
|
|
647
647
|
if (!this.raw) {
|
|
648
|
-
throw ( (new Error(localize(
|
|
648
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'setVariable'))));
|
|
649
649
|
}
|
|
650
650
|
return this.raw.setVariable({ variablesReference, name, value });
|
|
651
651
|
}
|
|
652
652
|
setExpression(frameId, expression, value) {
|
|
653
653
|
if (!this.raw) {
|
|
654
654
|
throw ( (new Error(
|
|
655
|
-
localize(
|
|
655
|
+
localize(5789, "No debugger available, can not send '{0}'", 'setExpression')
|
|
656
656
|
)));
|
|
657
657
|
}
|
|
658
658
|
return this.raw.setExpression({ expression, value, frameId });
|
|
659
659
|
}
|
|
660
660
|
gotoTargets(source, line, column) {
|
|
661
661
|
if (!this.raw) {
|
|
662
|
-
throw ( (new Error(localize(
|
|
662
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'gotoTargets'))));
|
|
663
663
|
}
|
|
664
664
|
return this.raw.gotoTargets({ source, line, column });
|
|
665
665
|
}
|
|
666
666
|
goto(threadId, targetId) {
|
|
667
667
|
if (!this.raw) {
|
|
668
|
-
throw ( (new Error(localize(
|
|
668
|
+
throw ( (new Error(localize(5789, "No debugger available, can not send '{0}'", 'goto'))));
|
|
669
669
|
}
|
|
670
670
|
return this.raw.goto({ threadId, targetId });
|
|
671
671
|
}
|
|
672
672
|
loadSource(resource) {
|
|
673
673
|
if (!this.raw) {
|
|
674
|
-
return Promise.reject(( (new Error(( localize(
|
|
674
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'loadSource'))))));
|
|
675
675
|
}
|
|
676
676
|
const source = this.getSourceForUri(resource);
|
|
677
677
|
let rawSource;
|
|
@@ -686,7 +686,7 @@ let DebugSession = class DebugSession {
|
|
|
686
686
|
}
|
|
687
687
|
async getLoadedSources() {
|
|
688
688
|
if (!this.raw) {
|
|
689
|
-
return Promise.reject(( (new Error(( localize(
|
|
689
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'getLoadedSources'))))));
|
|
690
690
|
}
|
|
691
691
|
const response = await this.raw.loadedSources({});
|
|
692
692
|
if (response?.body && response.body.sources) {
|
|
@@ -700,7 +700,7 @@ let DebugSession = class DebugSession {
|
|
|
700
700
|
}
|
|
701
701
|
async completions(frameId, threadId, text, position, overwriteBefore, token) {
|
|
702
702
|
if (!this.raw) {
|
|
703
|
-
return Promise.reject(( (new Error(( localize(
|
|
703
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'completions'))))));
|
|
704
704
|
}
|
|
705
705
|
const sessionCancelationToken = this.getNewCancellationToken(threadId, token);
|
|
706
706
|
return this.raw.completions({
|
|
@@ -712,33 +712,33 @@ let DebugSession = class DebugSession {
|
|
|
712
712
|
}
|
|
713
713
|
async stepInTargets(frameId) {
|
|
714
714
|
if (!this.raw) {
|
|
715
|
-
return Promise.reject(( (new Error(( localize(
|
|
715
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'stepInTargets'))))));
|
|
716
716
|
}
|
|
717
717
|
const response = await this.raw.stepInTargets({ frameId });
|
|
718
718
|
return response?.body.targets;
|
|
719
719
|
}
|
|
720
720
|
async cancel(progressId) {
|
|
721
721
|
if (!this.raw) {
|
|
722
|
-
return Promise.reject(( (new Error(( localize(
|
|
722
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'cancel'))))));
|
|
723
723
|
}
|
|
724
724
|
return this.raw.cancel({ progressId });
|
|
725
725
|
}
|
|
726
726
|
async disassemble(memoryReference, offset, instructionOffset, instructionCount) {
|
|
727
727
|
if (!this.raw) {
|
|
728
|
-
return Promise.reject(( (new Error(( localize(
|
|
728
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'disassemble'))))));
|
|
729
729
|
}
|
|
730
730
|
const response = await this.raw.disassemble({ memoryReference, offset, instructionOffset, instructionCount, resolveSymbols: true });
|
|
731
731
|
return response?.body?.instructions;
|
|
732
732
|
}
|
|
733
733
|
readMemory(memoryReference, offset, count) {
|
|
734
734
|
if (!this.raw) {
|
|
735
|
-
return Promise.reject(( (new Error(( localize(
|
|
735
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'readMemory'))))));
|
|
736
736
|
}
|
|
737
737
|
return this.raw.readMemory({ count, memoryReference, offset });
|
|
738
738
|
}
|
|
739
739
|
writeMemory(memoryReference, offset, data, allowPartial) {
|
|
740
740
|
if (!this.raw) {
|
|
741
|
-
return Promise.reject(( (new Error(( localize(
|
|
741
|
+
return Promise.reject(( (new Error(( localize(5789, "No debugger available, can not send '{0}'", 'disassemble'))))));
|
|
742
742
|
}
|
|
743
743
|
return this.raw.writeMemory({ memoryReference, offset, allowPartial, data });
|
|
744
744
|
}
|
|
@@ -849,8 +849,8 @@ let DebugSession = class DebugSession {
|
|
|
849
849
|
}
|
|
850
850
|
this.rawListeners.add(this.raw.onDidInitialize(async () => {
|
|
851
851
|
status(this.configuration.noDebug
|
|
852
|
-
? ( localize(
|
|
853
|
-
: ( localize(
|
|
852
|
+
? ( localize(5792, "Started running without debugging."))
|
|
853
|
+
: ( localize(5793, "Debugging started.")));
|
|
854
854
|
const sendConfigurationDone = async () => {
|
|
855
855
|
if (this.raw && this.raw.capabilities.supportsConfigurationDoneRequest) {
|
|
856
856
|
try {
|
|
@@ -897,7 +897,7 @@ let DebugSession = class DebugSession {
|
|
|
897
897
|
}
|
|
898
898
|
}));
|
|
899
899
|
this.rawListeners.add(this.raw.onDidTerminateDebugee(async (event) => {
|
|
900
|
-
status(( localize(
|
|
900
|
+
status(( localize(5794, "Debugging stopped.")));
|
|
901
901
|
if (event.body && event.body.restart) {
|
|
902
902
|
await this.debugService.restartSession(this, event.body.restart);
|
|
903
903
|
}
|
|
@@ -70,17 +70,17 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
70
70
|
}
|
|
71
71
|
const taskLabel = typeof taskId === 'string' ? taskId : taskId ? taskId.name : '';
|
|
72
72
|
const message = errorCount > 1
|
|
73
|
-
? ( localize(
|
|
73
|
+
? ( localize(5795, "Errors exist after running preLaunchTask '{0}'.", taskLabel))
|
|
74
74
|
: errorCount === 1
|
|
75
|
-
? ( localize(
|
|
75
|
+
? ( localize(5796, "Error exists after running preLaunchTask '{0}'.", taskLabel))
|
|
76
76
|
: taskSummary && typeof taskSummary.exitCode === 'number'
|
|
77
77
|
? ( localize(
|
|
78
|
-
|
|
78
|
+
5797,
|
|
79
79
|
"The preLaunchTask '{0}' terminated with exit code {1}.",
|
|
80
80
|
taskLabel,
|
|
81
81
|
taskSummary.exitCode
|
|
82
82
|
))
|
|
83
|
-
: ( localize(
|
|
83
|
+
: ( localize(5798, "The preLaunchTask '{0}' terminated.", taskLabel));
|
|
84
84
|
let DebugChoice;
|
|
85
85
|
( ((function(DebugChoice) {
|
|
86
86
|
DebugChoice[DebugChoice["DebugAnyway"] = 1] = "DebugAnyway";
|
|
@@ -92,20 +92,20 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
92
92
|
message,
|
|
93
93
|
buttons: [
|
|
94
94
|
{
|
|
95
|
-
label: ( localize(
|
|
95
|
+
label: ( localize(5799, "&&Debug Anyway")),
|
|
96
96
|
run: () => DebugChoice.DebugAnyway
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
|
-
label: ( localize(
|
|
99
|
+
label: ( localize(5800, "&&Show Errors")),
|
|
100
100
|
run: () => DebugChoice.ShowErrors
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
103
|
cancelButton: {
|
|
104
|
-
label: ( localize(
|
|
104
|
+
label: ( localize(5801, "Abort")),
|
|
105
105
|
run: () => DebugChoice.Cancel
|
|
106
106
|
},
|
|
107
107
|
checkbox: {
|
|
108
|
-
label: ( localize(
|
|
108
|
+
label: ( localize(5802, "Remember my choice in user settings")),
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
const debugAnyway = result === DebugChoice.DebugAnyway;
|
|
@@ -141,7 +141,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
141
141
|
message: err.message,
|
|
142
142
|
buttons: [
|
|
143
143
|
{
|
|
144
|
-
label: ( localize(
|
|
144
|
+
label: ( localize(5799, "&&Debug Anyway")),
|
|
145
145
|
run: () => DebugChoice.DebugAnyway
|
|
146
146
|
},
|
|
147
147
|
{
|
|
@@ -153,7 +153,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
153
153
|
run: () => DebugChoice.Cancel
|
|
154
154
|
},
|
|
155
155
|
checkbox: {
|
|
156
|
-
label: ( localize(
|
|
156
|
+
label: ( localize(5803, "Remember my choice for this task"))
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
choice = result;
|
|
@@ -174,7 +174,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
174
174
|
}
|
|
175
175
|
if (!root) {
|
|
176
176
|
return Promise.reject(( (new Error(( localize(
|
|
177
|
-
|
|
177
|
+
5804,
|
|
178
178
|
"Task '{0}' can not be referenced from a launch configuration that is in a different workspace folder.",
|
|
179
179
|
typeof taskId === 'string' ? taskId : taskId.type
|
|
180
180
|
))))));
|
|
@@ -182,8 +182,8 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
182
182
|
const task = await this.taskService.getTask(root, taskId);
|
|
183
183
|
if (!task) {
|
|
184
184
|
const errorMessage = typeof taskId === 'string'
|
|
185
|
-
? ( localize(
|
|
186
|
-
: ( localize(
|
|
185
|
+
? ( localize(5805, "Could not find the task '{0}'.", taskId))
|
|
186
|
+
: ( localize(5806, "Could not find the specified task."));
|
|
187
187
|
return Promise.reject(createErrorWithActions(errorMessage, [( (new Action(
|
|
188
188
|
DEBUG_CONFIGURE_COMMAND_ID,
|
|
189
189
|
DEBUG_CONFIGURE_LABEL,
|
|
@@ -238,12 +238,12 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
238
238
|
if (!taskStarted) {
|
|
239
239
|
const errorMessage = typeof taskId === 'string'
|
|
240
240
|
? ( localize(
|
|
241
|
-
|
|
241
|
+
5807,
|
|
242
242
|
"The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
|
|
243
243
|
taskId
|
|
244
244
|
))
|
|
245
245
|
: ( localize(
|
|
246
|
-
|
|
246
|
+
5808,
|
|
247
247
|
"The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
|
|
248
248
|
JSON.stringify(taskId)
|
|
249
249
|
));
|