@codingame/monaco-vscode-debug-service-override 22.1.9 → 23.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 +15 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.d.ts +13 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +44 -41
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +114 -114
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +12 -12
- 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 +28 -32
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +29 -30
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +46 -46
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +19 -25
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +15 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +8 -8
- 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 +3 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +35 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +6 -6
- 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 +44 -44
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +12 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +8 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { alert, status } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
4
|
-
import {
|
|
4
|
+
import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
5
5
|
import { distinct } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
6
6
|
import { RunOnceScheduler, raceTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
7
7
|
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
@@ -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-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-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(6686, "1 active session")) : ( localize(6687, "{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(6688, '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(6689, "Running executes build tasks and program code from your workspace.")) : ( localize(
|
|
277
|
+
6690,
|
|
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
|
+
6691,
|
|
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(6692, "Could not find launch configuration '{0}' in the workspace.", name))
|
|
338
338
|
: ( localize(
|
|
339
|
-
|
|
339
|
+
6693,
|
|
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
|
+
6694,
|
|
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
|
+
6695,
|
|
369
369
|
"Configuration '{0}' is missing in 'launch.json'.",
|
|
370
370
|
typeof configOrName === 'string' ? configOrName : configOrName.name
|
|
371
371
|
)) :
|
|
372
|
-
( localize(
|
|
372
|
+
( localize(6696, "'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);
|
|
@@ -473,23 +473,28 @@ let DebugService = class DebugService {
|
|
|
473
473
|
let message;
|
|
474
474
|
if (configByProviders.request !== 'attach' && configByProviders.request !== 'launch') {
|
|
475
475
|
message = configByProviders.request ? ( localize(
|
|
476
|
-
|
|
476
|
+
6697,
|
|
477
477
|
"Attribute '{0}' has an unsupported value '{1}' in the chosen debug configuration.",
|
|
478
478
|
'request',
|
|
479
479
|
configByProviders.request
|
|
480
480
|
))
|
|
481
481
|
: ( localize(
|
|
482
|
-
|
|
482
|
+
6698,
|
|
483
483
|
"Attribute '{0}' is missing from the chosen debug configuration.",
|
|
484
484
|
'request'
|
|
485
485
|
));
|
|
486
486
|
}
|
|
487
487
|
else {
|
|
488
|
-
message = resolvedConfig.type ? ( localize(
|
|
489
|
-
( localize(
|
|
488
|
+
message = resolvedConfig.type ? ( localize(6699, "Configured debug type '{0}' is not supported.", resolvedConfig.type)) :
|
|
489
|
+
( localize(6700, "Missing property 'type' for the chosen launch configuration."));
|
|
490
490
|
}
|
|
491
491
|
const actionList = [];
|
|
492
|
-
actionList.push((
|
|
492
|
+
actionList.push(toAction({
|
|
493
|
+
id: 'installAdditionalDebuggers',
|
|
494
|
+
label: ( localize(6701, "Install {0} Extension", resolvedConfig.type)),
|
|
495
|
+
enabled: true,
|
|
496
|
+
run: async () => this.commandService.executeCommand('debug.installAdditionalDebuggers', resolvedConfig?.type)
|
|
497
|
+
}));
|
|
493
498
|
await this.showError(message, actionList);
|
|
494
499
|
return false;
|
|
495
500
|
}
|
|
@@ -510,7 +515,7 @@ let DebugService = class DebugService {
|
|
|
510
515
|
}
|
|
511
516
|
else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
|
|
512
517
|
await this.showError(( localize(
|
|
513
|
-
|
|
518
|
+
6702,
|
|
514
519
|
"The active file can not be debugged. Make sure it is saved and that you have a debug extension installed for that file type."
|
|
515
520
|
)));
|
|
516
521
|
}
|
|
@@ -578,7 +583,7 @@ let DebugService = class DebugService {
|
|
|
578
583
|
async confirmConcurrentSession(sessionLabel) {
|
|
579
584
|
const result = await this.dialogService.confirm({
|
|
580
585
|
message: ( localize(
|
|
581
|
-
|
|
586
|
+
6703,
|
|
582
587
|
"'{0}' is already running. Do you want to start another instance?",
|
|
583
588
|
sessionLabel
|
|
584
589
|
))
|
|
@@ -629,7 +634,7 @@ let DebugService = class DebugService {
|
|
|
629
634
|
if (adapterExitEvent) {
|
|
630
635
|
if (adapterExitEvent.error) {
|
|
631
636
|
this.notificationService.error(( localize(
|
|
632
|
-
|
|
637
|
+
6704,
|
|
633
638
|
"Debug adapter process has terminated unexpectedly ({0})",
|
|
634
639
|
adapterExitEvent.error.message || ( adapterExitEvent.error.toString())
|
|
635
640
|
)));
|
|
@@ -841,13 +846,7 @@ let DebugService = class DebugService {
|
|
|
841
846
|
return Promise.resolve(config);
|
|
842
847
|
}
|
|
843
848
|
async showError(message, errorActions = [], promptLaunchJson = true) {
|
|
844
|
-
const configureAction = (
|
|
845
|
-
DEBUG_CONFIGURE_COMMAND_ID,
|
|
846
|
-
DEBUG_CONFIGURE_LABEL,
|
|
847
|
-
undefined,
|
|
848
|
-
true,
|
|
849
|
-
() => this.commandService.executeCommand(DEBUG_CONFIGURE_COMMAND_ID)
|
|
850
|
-
));
|
|
849
|
+
const configureAction = toAction({ id: DEBUG_CONFIGURE_COMMAND_ID, label: DEBUG_CONFIGURE_LABEL, enabled: true, run: () => this.commandService.executeCommand(DEBUG_CONFIGURE_COMMAND_ID) });
|
|
851
850
|
const actions = errorActions.filter((action) => action.id.endsWith('.command')).length > 0 ?
|
|
852
851
|
errorActions :
|
|
853
852
|
[...errorActions, ...(promptLaunchJson ? [configureAction] : [])];
|
|
@@ -875,7 +874,7 @@ let DebugService = class DebugService {
|
|
|
875
874
|
if (lineNumber >= 1 && lineNumber <= model.getLineCount()) {
|
|
876
875
|
const lineContent = control.getModel().getLineContent(lineNumber);
|
|
877
876
|
alert(( localize(
|
|
878
|
-
|
|
877
|
+
6705,
|
|
879
878
|
"{0}, debugging paused {1}, {2}:{3}",
|
|
880
879
|
lineContent,
|
|
881
880
|
thread && thread.stoppedDetails ? `, reason ${thread.stoppedDetails.reason}` : '',
|
|
@@ -948,7 +947,7 @@ let DebugService = class DebugService {
|
|
|
948
947
|
async addBreakpoints(uri, rawBreakpoints, ariaAnnounce = true) {
|
|
949
948
|
const breakpoints = this.model.addBreakpoints(uri, rawBreakpoints);
|
|
950
949
|
if (ariaAnnounce) {
|
|
951
|
-
breakpoints.forEach(bp => status(( localize(
|
|
950
|
+
breakpoints.forEach(bp => status(( localize(6706, "Added breakpoint, line {0}, file {1}", bp.lineNumber, uri.fsPath))));
|
|
952
951
|
}
|
|
953
952
|
this.debugStorage.storeBreakpoints(this.model);
|
|
954
953
|
await this.sendBreakpoints(uri);
|
|
@@ -970,7 +969,7 @@ let DebugService = class DebugService {
|
|
|
970
969
|
const breakpoints = this.model.getBreakpoints();
|
|
971
970
|
const toRemove = breakpoints.filter(bp => !id || bp.getId() === id);
|
|
972
971
|
toRemove.forEach(bp => status(( localize(
|
|
973
|
-
|
|
972
|
+
6707,
|
|
974
973
|
"Removed breakpoint, line {0}, file {1}",
|
|
975
974
|
bp.lineNumber,
|
|
976
975
|
bp.uri.fsPath
|
|
@@ -151,7 +151,7 @@ export declare class DebugSession implements IDebugSession {
|
|
|
151
151
|
sendFunctionBreakpoints(fbpts: IFunctionBreakpoint[]): Promise<void>;
|
|
152
152
|
sendExceptionBreakpoints(exbpts: IExceptionBreakpoint[]): Promise<void>;
|
|
153
153
|
dataBytesBreakpointInfo(address: string, bytes: number): Promise<IDataBreakpointInfoResponse | undefined>;
|
|
154
|
-
dataBreakpointInfo(name: string, variablesReference?: number): Promise<{
|
|
154
|
+
dataBreakpointInfo(name: string, variablesReference?: number, frameId?: number): Promise<{
|
|
155
155
|
dataId: string | null;
|
|
156
156
|
description: string;
|
|
157
157
|
canPersist?: boolean;
|
|
@@ -22,7 +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-
|
|
25
|
+
import { FocusMode } from '@codingame/monaco-vscode-afb6e5ca-fe46-5d5a-aa9c-f722ebefae39-common/vscode/vs/platform/native/common/native';
|
|
26
26
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
27
27
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
28
28
|
import { TelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
@@ -291,7 +291,7 @@ let DebugSession = class DebugSession {
|
|
|
291
291
|
}
|
|
292
292
|
async launchOrAttach(config) {
|
|
293
293
|
if (!this.raw) {
|
|
294
|
-
throw ( new Error(( localize(
|
|
294
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'launch or attach'))));
|
|
295
295
|
}
|
|
296
296
|
if (this.parentSession && this.parentSession.state === State.Inactive) {
|
|
297
297
|
throw canceled();
|
|
@@ -351,7 +351,7 @@ let DebugSession = class DebugSession {
|
|
|
351
351
|
}
|
|
352
352
|
async restart() {
|
|
353
353
|
if (!this.raw) {
|
|
354
|
-
throw ( new Error(( localize(
|
|
354
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'restart'))));
|
|
355
355
|
}
|
|
356
356
|
this.cancelAllRequests();
|
|
357
357
|
if (this._options.lifecycleManagedByParent && this.parentSession) {
|
|
@@ -363,7 +363,7 @@ let DebugSession = class DebugSession {
|
|
|
363
363
|
}
|
|
364
364
|
async sendBreakpoints(modelUri, breakpointsToSend, sourceModified) {
|
|
365
365
|
if (!this.raw) {
|
|
366
|
-
throw ( new Error(( localize(
|
|
366
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'breakpoints'))));
|
|
367
367
|
}
|
|
368
368
|
if (!this.raw.readyForBreakpoints) {
|
|
369
369
|
return Promise.resolve(undefined);
|
|
@@ -391,7 +391,7 @@ let DebugSession = class DebugSession {
|
|
|
391
391
|
}
|
|
392
392
|
async sendFunctionBreakpoints(fbpts) {
|
|
393
393
|
if (!this.raw) {
|
|
394
|
-
throw ( new Error(( localize(
|
|
394
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'function breakpoints'))));
|
|
395
395
|
}
|
|
396
396
|
if (this.raw.readyForBreakpoints) {
|
|
397
397
|
const response = await this.raw.setFunctionBreakpoints({ breakpoints: ( fbpts.map(bp => bp.toDAP())) });
|
|
@@ -406,7 +406,7 @@ let DebugSession = class DebugSession {
|
|
|
406
406
|
}
|
|
407
407
|
async sendExceptionBreakpoints(exbpts) {
|
|
408
408
|
if (!this.raw) {
|
|
409
|
-
throw ( new Error(( localize(
|
|
409
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'exception breakpoints'))));
|
|
410
410
|
}
|
|
411
411
|
if (this.raw.readyForBreakpoints) {
|
|
412
412
|
const args = this.capabilities.supportsExceptionFilterOptions ? {
|
|
@@ -430,26 +430,26 @@ let DebugSession = class DebugSession {
|
|
|
430
430
|
}
|
|
431
431
|
dataBytesBreakpointInfo(address, bytes) {
|
|
432
432
|
if (this.raw?.capabilities.supportsDataBreakpointBytes === false) {
|
|
433
|
-
throw ( new Error(( localize(
|
|
433
|
+
throw ( new Error(( localize(6709, "Session does not support breakpoints with bytes"))));
|
|
434
434
|
}
|
|
435
435
|
return this._dataBreakpointInfo({ name: address, bytes, asAddress: true });
|
|
436
436
|
}
|
|
437
|
-
dataBreakpointInfo(name, variablesReference) {
|
|
438
|
-
return this._dataBreakpointInfo({ name, variablesReference });
|
|
437
|
+
dataBreakpointInfo(name, variablesReference, frameId) {
|
|
438
|
+
return this._dataBreakpointInfo({ name, variablesReference, frameId });
|
|
439
439
|
}
|
|
440
440
|
async _dataBreakpointInfo(args) {
|
|
441
441
|
if (!this.raw) {
|
|
442
|
-
throw ( new Error(( localize(
|
|
442
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'data breakpoints info'))));
|
|
443
443
|
}
|
|
444
444
|
if (!this.raw.readyForBreakpoints) {
|
|
445
|
-
throw ( new Error(( localize(
|
|
445
|
+
throw ( new Error(( localize(6710, "Session is not ready for breakpoints"))));
|
|
446
446
|
}
|
|
447
447
|
const response = await this.raw.dataBreakpointInfo(args);
|
|
448
448
|
return response?.body;
|
|
449
449
|
}
|
|
450
450
|
async sendDataBreakpoints(dataBreakpoints) {
|
|
451
451
|
if (!this.raw) {
|
|
452
|
-
throw ( new Error(( localize(
|
|
452
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'data breakpoints'))));
|
|
453
453
|
}
|
|
454
454
|
if (this.raw.readyForBreakpoints) {
|
|
455
455
|
const converted = await Promise.all(( dataBreakpoints.map(async (bp) => {
|
|
@@ -480,7 +480,7 @@ let DebugSession = class DebugSession {
|
|
|
480
480
|
async sendInstructionBreakpoints(instructionBreakpoints) {
|
|
481
481
|
if (!this.raw) {
|
|
482
482
|
throw ( new Error(( localize(
|
|
483
|
-
|
|
483
|
+
6708,
|
|
484
484
|
"No debugger available, can not send '{0}'",
|
|
485
485
|
'instruction breakpoints'
|
|
486
486
|
))));
|
|
@@ -498,7 +498,7 @@ let DebugSession = class DebugSession {
|
|
|
498
498
|
}
|
|
499
499
|
async breakpointsLocations(uri, lineNumber) {
|
|
500
500
|
if (!this.raw) {
|
|
501
|
-
throw ( new Error(( localize(
|
|
501
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'breakpoints locations'))));
|
|
502
502
|
}
|
|
503
503
|
const source = this.getRawSource(uri);
|
|
504
504
|
const response = await this.raw.breakpointLocations({ source, line: lineNumber });
|
|
@@ -513,20 +513,20 @@ let DebugSession = class DebugSession {
|
|
|
513
513
|
}
|
|
514
514
|
customRequest(request, args) {
|
|
515
515
|
if (!this.raw) {
|
|
516
|
-
throw ( new Error(( localize(
|
|
516
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", request))));
|
|
517
517
|
}
|
|
518
518
|
return this.raw.custom(request, args);
|
|
519
519
|
}
|
|
520
520
|
stackTrace(threadId, startFrame, levels, token) {
|
|
521
521
|
if (!this.raw) {
|
|
522
|
-
throw ( new Error(( localize(
|
|
522
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'stackTrace'))));
|
|
523
523
|
}
|
|
524
524
|
const sessionToken = this.getNewCancellationToken(threadId, token);
|
|
525
525
|
return this.raw.stackTrace({ threadId, startFrame, levels }, sessionToken);
|
|
526
526
|
}
|
|
527
527
|
async exceptionInfo(threadId) {
|
|
528
528
|
if (!this.raw) {
|
|
529
|
-
throw ( new Error(( localize(
|
|
529
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'exceptionInfo'))));
|
|
530
530
|
}
|
|
531
531
|
const response = await this.raw.exceptionInfo({ threadId });
|
|
532
532
|
if (response) {
|
|
@@ -541,28 +541,28 @@ let DebugSession = class DebugSession {
|
|
|
541
541
|
}
|
|
542
542
|
scopes(frameId, threadId) {
|
|
543
543
|
if (!this.raw) {
|
|
544
|
-
throw ( new Error(( localize(
|
|
544
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'scopes'))));
|
|
545
545
|
}
|
|
546
546
|
const token = this.getNewCancellationToken(threadId);
|
|
547
547
|
return this.raw.scopes({ frameId }, token);
|
|
548
548
|
}
|
|
549
549
|
variables(variablesReference, threadId, filter, start, count) {
|
|
550
550
|
if (!this.raw) {
|
|
551
|
-
throw ( new Error(( localize(
|
|
551
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'variables'))));
|
|
552
552
|
}
|
|
553
553
|
const token = threadId ? this.getNewCancellationToken(threadId) : undefined;
|
|
554
554
|
return this.raw.variables({ variablesReference, filter, start, count }, token);
|
|
555
555
|
}
|
|
556
556
|
evaluate(expression, frameId, context, location) {
|
|
557
557
|
if (!this.raw) {
|
|
558
|
-
throw ( new Error(( localize(
|
|
558
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'evaluate'))));
|
|
559
559
|
}
|
|
560
560
|
return this.raw.evaluate({ expression, frameId, context, line: location?.line, column: location?.column, source: location?.source });
|
|
561
561
|
}
|
|
562
562
|
async restartFrame(frameId, threadId) {
|
|
563
563
|
await this.waitForTriggeredBreakpoints();
|
|
564
564
|
if (!this.raw) {
|
|
565
|
-
throw ( new Error(( localize(
|
|
565
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'restartFrame'))));
|
|
566
566
|
}
|
|
567
567
|
await this.raw.restartFrame({ frameId }, threadId);
|
|
568
568
|
}
|
|
@@ -575,7 +575,7 @@ let DebugSession = class DebugSession {
|
|
|
575
575
|
async next(threadId, granularity) {
|
|
576
576
|
await this.waitForTriggeredBreakpoints();
|
|
577
577
|
if (!this.raw) {
|
|
578
|
-
throw ( new Error(( localize(
|
|
578
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'next'))));
|
|
579
579
|
}
|
|
580
580
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
581
581
|
await this.raw.next({ threadId, granularity });
|
|
@@ -583,7 +583,7 @@ let DebugSession = class DebugSession {
|
|
|
583
583
|
async stepIn(threadId, targetId, granularity) {
|
|
584
584
|
await this.waitForTriggeredBreakpoints();
|
|
585
585
|
if (!this.raw) {
|
|
586
|
-
throw ( new Error(( localize(
|
|
586
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'stepIn'))));
|
|
587
587
|
}
|
|
588
588
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
589
589
|
await this.raw.stepIn({ threadId, targetId, granularity });
|
|
@@ -591,7 +591,7 @@ let DebugSession = class DebugSession {
|
|
|
591
591
|
async stepOut(threadId, granularity) {
|
|
592
592
|
await this.waitForTriggeredBreakpoints();
|
|
593
593
|
if (!this.raw) {
|
|
594
|
-
throw ( new Error(( localize(
|
|
594
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'stepOut'))));
|
|
595
595
|
}
|
|
596
596
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
597
597
|
await this.raw.stepOut({ threadId, granularity });
|
|
@@ -599,7 +599,7 @@ let DebugSession = class DebugSession {
|
|
|
599
599
|
async stepBack(threadId, granularity) {
|
|
600
600
|
await this.waitForTriggeredBreakpoints();
|
|
601
601
|
if (!this.raw) {
|
|
602
|
-
throw ( new Error(( localize(
|
|
602
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'stepBack'))));
|
|
603
603
|
}
|
|
604
604
|
this.setLastSteppingGranularity(threadId, granularity);
|
|
605
605
|
await this.raw.stepBack({ threadId, granularity });
|
|
@@ -607,56 +607,56 @@ let DebugSession = class DebugSession {
|
|
|
607
607
|
async continue(threadId) {
|
|
608
608
|
await this.waitForTriggeredBreakpoints();
|
|
609
609
|
if (!this.raw) {
|
|
610
|
-
throw ( new Error(( localize(
|
|
610
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'continue'))));
|
|
611
611
|
}
|
|
612
612
|
await this.raw.continue({ threadId });
|
|
613
613
|
}
|
|
614
614
|
async reverseContinue(threadId) {
|
|
615
615
|
await this.waitForTriggeredBreakpoints();
|
|
616
616
|
if (!this.raw) {
|
|
617
|
-
throw ( new Error(( localize(
|
|
617
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'reverse continue'))));
|
|
618
618
|
}
|
|
619
619
|
await this.raw.reverseContinue({ threadId });
|
|
620
620
|
}
|
|
621
621
|
async pause(threadId) {
|
|
622
622
|
if (!this.raw) {
|
|
623
|
-
throw ( new Error(( localize(
|
|
623
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'pause'))));
|
|
624
624
|
}
|
|
625
625
|
await this.raw.pause({ threadId });
|
|
626
626
|
}
|
|
627
627
|
async terminateThreads(threadIds) {
|
|
628
628
|
if (!this.raw) {
|
|
629
|
-
throw ( new Error(( localize(
|
|
629
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'terminateThreads'))));
|
|
630
630
|
}
|
|
631
631
|
await this.raw.terminateThreads({ threadIds });
|
|
632
632
|
}
|
|
633
633
|
setVariable(variablesReference, name, value) {
|
|
634
634
|
if (!this.raw) {
|
|
635
|
-
throw ( new Error(( localize(
|
|
635
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'setVariable'))));
|
|
636
636
|
}
|
|
637
637
|
return this.raw.setVariable({ variablesReference, name, value });
|
|
638
638
|
}
|
|
639
639
|
setExpression(frameId, expression, value) {
|
|
640
640
|
if (!this.raw) {
|
|
641
|
-
throw ( new Error(( localize(
|
|
641
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'setExpression'))));
|
|
642
642
|
}
|
|
643
643
|
return this.raw.setExpression({ expression, value, frameId });
|
|
644
644
|
}
|
|
645
645
|
gotoTargets(source, line, column) {
|
|
646
646
|
if (!this.raw) {
|
|
647
|
-
throw ( new Error(( localize(
|
|
647
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'gotoTargets'))));
|
|
648
648
|
}
|
|
649
649
|
return this.raw.gotoTargets({ source, line, column });
|
|
650
650
|
}
|
|
651
651
|
goto(threadId, targetId) {
|
|
652
652
|
if (!this.raw) {
|
|
653
|
-
throw ( new Error(( localize(
|
|
653
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'goto'))));
|
|
654
654
|
}
|
|
655
655
|
return this.raw.goto({ threadId, targetId });
|
|
656
656
|
}
|
|
657
657
|
loadSource(resource) {
|
|
658
658
|
if (!this.raw) {
|
|
659
|
-
return Promise.reject(( new Error(( localize(
|
|
659
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'loadSource')))));
|
|
660
660
|
}
|
|
661
661
|
const source = this.getSourceForUri(resource);
|
|
662
662
|
let rawSource;
|
|
@@ -671,7 +671,7 @@ let DebugSession = class DebugSession {
|
|
|
671
671
|
}
|
|
672
672
|
async getLoadedSources() {
|
|
673
673
|
if (!this.raw) {
|
|
674
|
-
return Promise.reject(( new Error(( localize(
|
|
674
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'getLoadedSources')))));
|
|
675
675
|
}
|
|
676
676
|
const response = await this.raw.loadedSources({});
|
|
677
677
|
if (response?.body && response.body.sources) {
|
|
@@ -683,7 +683,7 @@ let DebugSession = class DebugSession {
|
|
|
683
683
|
}
|
|
684
684
|
async completions(frameId, threadId, text, position, token) {
|
|
685
685
|
if (!this.raw) {
|
|
686
|
-
return Promise.reject(( new Error(( localize(
|
|
686
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'completions')))));
|
|
687
687
|
}
|
|
688
688
|
const sessionCancelationToken = this.getNewCancellationToken(threadId, token);
|
|
689
689
|
return this.raw.completions({
|
|
@@ -695,43 +695,43 @@ let DebugSession = class DebugSession {
|
|
|
695
695
|
}
|
|
696
696
|
async stepInTargets(frameId) {
|
|
697
697
|
if (!this.raw) {
|
|
698
|
-
return Promise.reject(( new Error(( localize(
|
|
698
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'stepInTargets')))));
|
|
699
699
|
}
|
|
700
700
|
const response = await this.raw.stepInTargets({ frameId });
|
|
701
701
|
return response?.body.targets;
|
|
702
702
|
}
|
|
703
703
|
async cancel(progressId) {
|
|
704
704
|
if (!this.raw) {
|
|
705
|
-
return Promise.reject(( new Error(( localize(
|
|
705
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'cancel')))));
|
|
706
706
|
}
|
|
707
707
|
return this.raw.cancel({ progressId });
|
|
708
708
|
}
|
|
709
709
|
async disassemble(memoryReference, offset, instructionOffset, instructionCount) {
|
|
710
710
|
if (!this.raw) {
|
|
711
|
-
return Promise.reject(( new Error(( localize(
|
|
711
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'disassemble')))));
|
|
712
712
|
}
|
|
713
713
|
const response = await this.raw.disassemble({ memoryReference, offset, instructionOffset, instructionCount, resolveSymbols: true });
|
|
714
714
|
return response?.body?.instructions;
|
|
715
715
|
}
|
|
716
716
|
readMemory(memoryReference, offset, count) {
|
|
717
717
|
if (!this.raw) {
|
|
718
|
-
return Promise.reject(( new Error(( localize(
|
|
718
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'readMemory')))));
|
|
719
719
|
}
|
|
720
720
|
return this.raw.readMemory({ count, memoryReference, offset });
|
|
721
721
|
}
|
|
722
722
|
writeMemory(memoryReference, offset, data, allowPartial) {
|
|
723
723
|
if (!this.raw) {
|
|
724
|
-
return Promise.reject(( new Error(( localize(
|
|
724
|
+
return Promise.reject(( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'disassemble')))));
|
|
725
725
|
}
|
|
726
726
|
return this.raw.writeMemory({ memoryReference, offset, allowPartial, data });
|
|
727
727
|
}
|
|
728
728
|
async resolveLocationReference(locationReference) {
|
|
729
729
|
if (!this.raw) {
|
|
730
|
-
throw ( new Error(( localize(
|
|
730
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'locations'))));
|
|
731
731
|
}
|
|
732
732
|
const location = await this.raw.locations({ locationReference });
|
|
733
733
|
if (!location?.body) {
|
|
734
|
-
throw ( new Error(( localize(
|
|
734
|
+
throw ( new Error(( localize(6708, "No debugger available, can not send '{0}'", 'locations'))));
|
|
735
735
|
}
|
|
736
736
|
const source = this.getSource(location.body.source);
|
|
737
737
|
return { column: 1, ...location.body, source };
|
|
@@ -843,8 +843,8 @@ let DebugSession = class DebugSession {
|
|
|
843
843
|
}
|
|
844
844
|
this.rawListeners.add(this.raw.onDidInitialize(async () => {
|
|
845
845
|
status(this.configuration.noDebug
|
|
846
|
-
? ( localize(
|
|
847
|
-
: ( localize(
|
|
846
|
+
? ( localize(6711, "Started running without debugging."))
|
|
847
|
+
: ( localize(6712, "Debugging started.")));
|
|
848
848
|
const sendConfigurationDone = async () => {
|
|
849
849
|
if (this.raw && this.raw.capabilities.supportsConfigurationDoneRequest) {
|
|
850
850
|
try {
|
|
@@ -891,7 +891,7 @@ let DebugSession = class DebugSession {
|
|
|
891
891
|
}
|
|
892
892
|
}));
|
|
893
893
|
this.rawListeners.add(this.raw.onDidTerminateDebugee(async (event) => {
|
|
894
|
-
status(( localize(
|
|
894
|
+
status(( localize(6713, "Debugging stopped.")));
|
|
895
895
|
if (event.body && event.body.restart) {
|
|
896
896
|
await this.debugService.restartSession(this, event.body.restart);
|
|
897
897
|
}
|
|
@@ -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(6717, "Debug")),
|
|
54
54
|
text: '$(debug-alt-small) ' + text,
|
|
55
|
-
ariaLabel: ( localize(
|
|
56
|
-
tooltip: ( localize(
|
|
55
|
+
ariaLabel: ( localize(6718, "Debug: {0}", text)),
|
|
56
|
+
tooltip: ( localize(6719, "Select and Start Debug Configuration")),
|
|
57
57
|
command: 'workbench.action.debug.selectandstart'
|
|
58
58
|
};
|
|
59
59
|
}
|