@codingame/monaco-vscode-debug-service-override 37.2.0 → 37.3.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 +6 -2
- package/session.d.ts +2 -0
- package/session.js +17 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +17 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +106 -106
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +20 -20
- package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +17 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +24 -24
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +33 -33
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +35 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +58 -58
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +15 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +10 -10
- 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/replAccessibilityHelp.js +36 -36
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +1 -1
- 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.js +14 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +5 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +45 -45
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +12 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +14 -14
- package/vscode/src/vs/workbench/contrib/debug/common/nullDebugService.d.ts +70 -0
- package/vscode/src/vs/workbench/contrib/debug/common/nullDebugService.js +137 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +2 -2
|
@@ -32,10 +32,10 @@ class ToggleBreakpointAction extends Action2 {
|
|
|
32
32
|
super({
|
|
33
33
|
id: TOGGLE_BREAKPOINT_ID,
|
|
34
34
|
title: {
|
|
35
|
-
...( localize2(
|
|
36
|
-
mnemonicTitle: ( localize(
|
|
35
|
+
...( localize2(13763, "Toggle Breakpoint")),
|
|
36
|
+
mnemonicTitle: ( localize(13764, "Toggle &&Breakpoint"))
|
|
37
37
|
},
|
|
38
|
-
category: ( localize2(
|
|
38
|
+
category: ( localize2(13765, "Debug")),
|
|
39
39
|
f1: true,
|
|
40
40
|
precondition: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
41
41
|
keybinding: {
|
|
@@ -78,20 +78,20 @@ class ToggleBreakpointAction extends Action2 {
|
|
|
78
78
|
if (editor?.hasModel()) {
|
|
79
79
|
const modelUri = editor.getModel().uri;
|
|
80
80
|
const canSet = debugService.canSetBreakpointsIn(editor.getModel());
|
|
81
|
-
const lineNumbers = [...( new Set(
|
|
82
|
-
await Promise.all(
|
|
81
|
+
const lineNumbers = [...( new Set(editor.getSelections().map(s => s.getPosition().lineNumber)))];
|
|
82
|
+
await Promise.all(lineNumbers.map(async line => {
|
|
83
83
|
const bps = debugService.getModel().getBreakpoints({
|
|
84
84
|
lineNumber: line,
|
|
85
85
|
uri: modelUri
|
|
86
86
|
});
|
|
87
87
|
if (bps.length) {
|
|
88
|
-
await Promise.all(
|
|
88
|
+
await Promise.all(bps.map(bp => debugService.removeBreakpoints(bp.getId())));
|
|
89
89
|
} else if (canSet) {
|
|
90
90
|
await debugService.addBreakpoints(modelUri, [{
|
|
91
91
|
lineNumber: line
|
|
92
92
|
}]);
|
|
93
93
|
}
|
|
94
|
-
}))
|
|
94
|
+
}));
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -99,11 +99,11 @@ class ConditionalBreakpointAction extends EditorAction {
|
|
|
99
99
|
constructor() {
|
|
100
100
|
super({
|
|
101
101
|
id: "editor.debug.action.conditionalBreakpoint",
|
|
102
|
-
label: ( localize2(
|
|
102
|
+
label: ( localize2(13766, "Debug: Add Conditional Breakpoint...")),
|
|
103
103
|
precondition: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
104
104
|
menuOpts: {
|
|
105
105
|
menuId: MenuId.MenubarNewBreakpointMenu,
|
|
106
|
-
title: ( localize(
|
|
106
|
+
title: ( localize(13767, "&&Conditional Breakpoint...")),
|
|
107
107
|
group: "1_breakpoints",
|
|
108
108
|
order: 1,
|
|
109
109
|
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
@@ -122,11 +122,11 @@ class LogPointAction extends EditorAction {
|
|
|
122
122
|
constructor() {
|
|
123
123
|
super({
|
|
124
124
|
id: "editor.debug.action.addLogPoint",
|
|
125
|
-
label: ( localize2(
|
|
125
|
+
label: ( localize2(13768, "Debug: Add Logpoint...")),
|
|
126
126
|
precondition: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
127
127
|
menuOpts: [{
|
|
128
128
|
menuId: MenuId.MenubarNewBreakpointMenu,
|
|
129
|
-
title: ( localize(
|
|
129
|
+
title: ( localize(13769, "&&Logpoint...")),
|
|
130
130
|
group: "1_breakpoints",
|
|
131
131
|
order: 4,
|
|
132
132
|
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
@@ -145,12 +145,12 @@ class TriggerByBreakpointAction extends EditorAction {
|
|
|
145
145
|
constructor() {
|
|
146
146
|
super({
|
|
147
147
|
id: "editor.debug.action.triggerByBreakpoint",
|
|
148
|
-
label: ( localize(
|
|
148
|
+
label: ( localize(13770, "Debug: Add Triggered Breakpoint...")),
|
|
149
149
|
precondition: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
150
150
|
alias: "Debug: Triggered Breakpoint...",
|
|
151
151
|
menuOpts: [{
|
|
152
152
|
menuId: MenuId.MenubarNewBreakpointMenu,
|
|
153
|
-
title: ( localize(
|
|
153
|
+
title: ( localize(13771, "&&Triggered Breakpoint...")),
|
|
154
154
|
group: "1_breakpoints",
|
|
155
155
|
order: 4,
|
|
156
156
|
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
@@ -173,12 +173,12 @@ class EditBreakpointAction extends EditorAction {
|
|
|
173
173
|
constructor() {
|
|
174
174
|
super({
|
|
175
175
|
id: "editor.debug.action.editBreakpoint",
|
|
176
|
-
label: ( localize(
|
|
176
|
+
label: ( localize(13772, "Debug: Edit Breakpoint")),
|
|
177
177
|
alias: "Debug: Edit Existing Breakpoint",
|
|
178
178
|
precondition: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
179
179
|
menuOpts: {
|
|
180
180
|
menuId: MenuId.MenubarNewBreakpointMenu,
|
|
181
|
-
title: ( localize(
|
|
181
|
+
title: ( localize(13773, "&&Edit Breakpoint")),
|
|
182
182
|
group: "1_breakpoints",
|
|
183
183
|
order: 1,
|
|
184
184
|
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
@@ -198,12 +198,12 @@ class EditBreakpointAction extends EditorAction {
|
|
|
198
198
|
if (lineBreakpoints.length === 0) {
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
|
-
const breakpointDistances =
|
|
201
|
+
const breakpointDistances = lineBreakpoints.map(b => {
|
|
202
202
|
if (!b.column) {
|
|
203
203
|
return position.column;
|
|
204
204
|
}
|
|
205
205
|
return Math.abs(b.column - position.column);
|
|
206
|
-
})
|
|
206
|
+
});
|
|
207
207
|
const closestBreakpointIndex = breakpointDistances.indexOf(Math.min(...breakpointDistances));
|
|
208
208
|
const closestBreakpoint = lineBreakpoints[closestBreakpointIndex];
|
|
209
209
|
editor.getContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(closestBreakpoint.lineNumber, closestBreakpoint.column);
|
|
@@ -217,8 +217,8 @@ class OpenDisassemblyViewAction extends Action2 {
|
|
|
217
217
|
super({
|
|
218
218
|
id: OpenDisassemblyViewAction.ID,
|
|
219
219
|
title: {
|
|
220
|
-
...( localize2(
|
|
221
|
-
mnemonicTitle: ( localize(
|
|
220
|
+
...( localize2(13774, "Open Disassembly View")),
|
|
221
|
+
mnemonicTitle: ( localize(13775, "&&DisassemblyView"))
|
|
222
222
|
},
|
|
223
223
|
precondition: CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE,
|
|
224
224
|
menu: [{
|
|
@@ -256,11 +256,11 @@ class ToggleDisassemblyViewSourceCodeAction extends Action2 {
|
|
|
256
256
|
super({
|
|
257
257
|
id: ToggleDisassemblyViewSourceCodeAction.ID,
|
|
258
258
|
title: {
|
|
259
|
-
...( localize2(
|
|
260
|
-
mnemonicTitle: ( localize(
|
|
259
|
+
...( localize2(13776, "Toggle Source Code in Disassembly View")),
|
|
260
|
+
mnemonicTitle: ( localize(13777, "&&ToggleSource"))
|
|
261
261
|
},
|
|
262
262
|
metadata: {
|
|
263
|
-
description: ( localize2(
|
|
263
|
+
description: ( localize2(13778, "Shows or hides source code in disassembly"))
|
|
264
264
|
},
|
|
265
265
|
f1: true
|
|
266
266
|
});
|
|
@@ -278,7 +278,7 @@ class RunToCursorAction extends EditorAction {
|
|
|
278
278
|
this.ID = "editor.debug.action.runToCursor";
|
|
279
279
|
}
|
|
280
280
|
static {
|
|
281
|
-
this.LABEL = ( localize2(
|
|
281
|
+
this.LABEL = ( localize2(13779, "Run to Cursor"));
|
|
282
282
|
}
|
|
283
283
|
constructor() {
|
|
284
284
|
super({
|
|
@@ -315,7 +315,7 @@ class SelectionToReplAction extends EditorAction {
|
|
|
315
315
|
this.ID = "editor.debug.action.selectionToRepl";
|
|
316
316
|
}
|
|
317
317
|
static {
|
|
318
|
-
this.LABEL = ( localize2(
|
|
318
|
+
this.LABEL = ( localize2(13780, "Evaluate in Debug Console"));
|
|
319
319
|
}
|
|
320
320
|
constructor() {
|
|
321
321
|
super({
|
|
@@ -353,7 +353,7 @@ class SelectionToWatchExpressionsAction extends EditorAction {
|
|
|
353
353
|
this.ID = "editor.debug.action.selectionToWatch";
|
|
354
354
|
}
|
|
355
355
|
static {
|
|
356
|
-
this.LABEL = ( localize2(
|
|
356
|
+
this.LABEL = ( localize2(13781, "Add to Watch"));
|
|
357
357
|
}
|
|
358
358
|
constructor() {
|
|
359
359
|
super({
|
|
@@ -398,7 +398,7 @@ class ShowDebugHoverAction extends EditorAction {
|
|
|
398
398
|
constructor() {
|
|
399
399
|
super({
|
|
400
400
|
id: "editor.debug.action.showDebugHover",
|
|
401
|
-
label: ( localize2(
|
|
401
|
+
label: ( localize2(13782, "Debug: Show Hover")),
|
|
402
402
|
precondition: CONTEXT_IN_DEBUG_MODE,
|
|
403
403
|
kbOpts: {
|
|
404
404
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -415,13 +415,13 @@ class ShowDebugHoverAction extends EditorAction {
|
|
|
415
415
|
return editor.getContribution(EDITOR_CONTRIBUTION_ID)?.showHover(position, true);
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
const NO_TARGETS_MESSAGE = ( localize(
|
|
418
|
+
const NO_TARGETS_MESSAGE = ( localize(13783, "Step targets are not available here"));
|
|
419
419
|
class StepIntoTargetsAction extends EditorAction {
|
|
420
420
|
static {
|
|
421
421
|
this.ID = "editor.debug.action.stepIntoTargets";
|
|
422
422
|
}
|
|
423
423
|
static {
|
|
424
|
-
this.LABEL = ( localize(
|
|
424
|
+
this.LABEL = ( localize(13784, "Step Into Target"));
|
|
425
425
|
}
|
|
426
426
|
constructor() {
|
|
427
427
|
super({
|
|
@@ -489,12 +489,12 @@ class StepIntoTargetsAction extends EditorAction {
|
|
|
489
489
|
y
|
|
490
490
|
}),
|
|
491
491
|
getActions: () => {
|
|
492
|
-
return
|
|
492
|
+
return targets.map(t => toAction({
|
|
493
493
|
id: `stepIntoTarget:${t.id}`,
|
|
494
494
|
label: t.label,
|
|
495
495
|
enabled: true,
|
|
496
496
|
run: () => session.stepIn(frame.thread.threadId, t.id)
|
|
497
|
-
}))
|
|
497
|
+
}));
|
|
498
498
|
}
|
|
499
499
|
});
|
|
500
500
|
}
|
|
@@ -535,7 +535,7 @@ class GoToNextBreakpointAction extends GoToBreakpointAction {
|
|
|
535
535
|
constructor() {
|
|
536
536
|
super(true, {
|
|
537
537
|
id: "editor.debug.action.goToNextBreakpoint",
|
|
538
|
-
label: ( localize2(
|
|
538
|
+
label: ( localize2(13785, "Debug: Go to Next Breakpoint")),
|
|
539
539
|
precondition: CONTEXT_DEBUGGERS_AVAILABLE
|
|
540
540
|
});
|
|
541
541
|
}
|
|
@@ -544,7 +544,7 @@ class GoToPreviousBreakpointAction extends GoToBreakpointAction {
|
|
|
544
544
|
constructor() {
|
|
545
545
|
super(false, {
|
|
546
546
|
id: "editor.debug.action.goToPreviousBreakpoint",
|
|
547
|
-
label: ( localize2(
|
|
547
|
+
label: ( localize2(13786, "Debug: Go to Previous Breakpoint")),
|
|
548
548
|
precondition: CONTEXT_DEBUGGERS_AVAILABLE
|
|
549
549
|
});
|
|
550
550
|
}
|
|
@@ -553,7 +553,7 @@ class CloseExceptionWidgetAction extends EditorAction {
|
|
|
553
553
|
constructor() {
|
|
554
554
|
super({
|
|
555
555
|
id: "editor.debug.action.closeExceptionWidget",
|
|
556
|
-
label: ( localize2(
|
|
556
|
+
label: ( localize2(13787, "Close Exception Widget")),
|
|
557
557
|
precondition: CONTEXT_EXCEPTION_WIDGET_VISIBLE,
|
|
558
558
|
kbOpts: {
|
|
559
559
|
primary: KeyCode.Escape,
|
|
@@ -16,7 +16,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
16
16
|
constructor(debugService, contextService, commandService, notificationService) {
|
|
17
17
|
super(DEBUG_QUICK_ACCESS_PREFIX, {
|
|
18
18
|
noResultsPick: {
|
|
19
|
-
label: ( localize(
|
|
19
|
+
label: ( localize(13850, "No matching launch configurations"))
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
this.debugService = debugService;
|
|
@@ -47,7 +47,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
47
47
|
},
|
|
48
48
|
buttons: [{
|
|
49
49
|
iconClass: ThemeIcon.asClassName(debugConfigure),
|
|
50
|
-
tooltip: ( localize(
|
|
50
|
+
tooltip: ( localize(13851, "Configure Launch Configuration"))
|
|
51
51
|
}],
|
|
52
52
|
trigger: () => {
|
|
53
53
|
config.launch.openConfigFile({
|
|
@@ -69,7 +69,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
69
69
|
if (selectedConfiguration.name === config.name && selectedConfiguration.launch === config.launch) {
|
|
70
70
|
const separator = {
|
|
71
71
|
type: "separator",
|
|
72
|
-
label: ( localize(
|
|
72
|
+
label: ( localize(13852, "Most Recent"))
|
|
73
73
|
};
|
|
74
74
|
picks.unshift(separator, pick);
|
|
75
75
|
continue;
|
|
@@ -87,7 +87,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
87
87
|
if (dynamicProviders.length > 0) {
|
|
88
88
|
picks.push({
|
|
89
89
|
type: "separator",
|
|
90
|
-
label: ( localize(
|
|
90
|
+
label: ( localize(13853, "contributed"))
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
configManager.getRecentDynamicConfigurations().forEach((
|
|
@@ -105,7 +105,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
105
105
|
},
|
|
106
106
|
buttons: [{
|
|
107
107
|
iconClass: ThemeIcon.asClassName(debugRemoveConfig),
|
|
108
|
-
tooltip: ( localize(
|
|
108
|
+
tooltip: ( localize(13854, "Remove Launch Configuration"))
|
|
109
109
|
}],
|
|
110
110
|
trigger: () => {
|
|
111
111
|
configManager.removeRecentDynamicConfigurations(name, type);
|
|
@@ -134,7 +134,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
134
134
|
dynamicProviders.forEach(provider => {
|
|
135
135
|
picks.push({
|
|
136
136
|
label: `$(folder) ${provider.label}...`,
|
|
137
|
-
ariaLabel: ( localize(
|
|
137
|
+
ariaLabel: ( localize(13855, "{0} contributed configurations", provider.label)),
|
|
138
138
|
accept: async () => {
|
|
139
139
|
const pick = await provider.pick();
|
|
140
140
|
if (pick) {
|
|
@@ -152,11 +152,11 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
152
152
|
if (visibleLaunches.length > 0) {
|
|
153
153
|
picks.push({
|
|
154
154
|
type: "separator",
|
|
155
|
-
label: ( localize(
|
|
155
|
+
label: ( localize(13856, "configure"))
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
for (const launch of visibleLaunches) {
|
|
159
|
-
const label = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? ( localize(
|
|
159
|
+
const label = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? ( localize(13857, "Add Config ({0})...", launch.name)) : ( localize(13858, "Add Configuration..."));
|
|
160
160
|
picks.push({
|
|
161
161
|
label,
|
|
162
162
|
description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? launch.name : "",
|
|
@@ -168,7 +168,7 @@ let DebugService = class DebugService {
|
|
|
168
168
|
const viewContainer = this.viewDescriptorService.getViewContainerByViewId(CALLSTACK_VIEW_ID);
|
|
169
169
|
if (viewContainer) {
|
|
170
170
|
this.activity = this.activityService.showViewContainerActivity(viewContainer.id, {
|
|
171
|
-
badge: ( new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(
|
|
171
|
+
badge: ( new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(13859, "1 active session")) : ( localize(13860, "{0} active sessions", n))))
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -190,7 +190,7 @@ let DebugService = class DebugService {
|
|
|
190
190
|
}
|
|
191
191
|
}));
|
|
192
192
|
this.disposables.add(extensionService.onWillStop(evt => {
|
|
193
|
-
evt.veto(this.model.getSessions().length > 0, ( localize(
|
|
193
|
+
evt.veto(this.model.getSessions().length > 0, ( localize(13861, "A debug session is still running that would terminate.")));
|
|
194
194
|
}));
|
|
195
195
|
this.initContextKeys(contextKeyService);
|
|
196
196
|
}
|
|
@@ -303,10 +303,10 @@ let DebugService = class DebugService {
|
|
|
303
303
|
}
|
|
304
304
|
async startDebugging(launch, configOrName, options, saveBeforeStart = !options?.parentSession) {
|
|
305
305
|
const message = options && options.noDebug ? ( localize(
|
|
306
|
-
|
|
306
|
+
13862,
|
|
307
307
|
"Running executes build tasks and program code from your workspace."
|
|
308
308
|
)) : ( localize(
|
|
309
|
-
|
|
309
|
+
13863,
|
|
310
310
|
"Debugging executes build tasks and program code from your workspace."
|
|
311
311
|
));
|
|
312
312
|
const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({
|
|
@@ -338,7 +338,7 @@ let DebugService = class DebugService {
|
|
|
338
338
|
if (compound) {
|
|
339
339
|
if (!compound.configurations) {
|
|
340
340
|
throw ( new Error(( localize(
|
|
341
|
-
|
|
341
|
+
13864,
|
|
342
342
|
"Compound must have \"configurations\" attribute set in order to start multiple configurations."
|
|
343
343
|
))));
|
|
344
344
|
}
|
|
@@ -358,7 +358,7 @@ let DebugService = class DebugService {
|
|
|
358
358
|
compoundRoot: ( new DebugCompoundRoot())
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
const values = await Promise.all(
|
|
361
|
+
const values = await Promise.all(compound.configurations.map(configData => {
|
|
362
362
|
const name = typeof configData === "string" ? configData : configData.name;
|
|
363
363
|
if (name === compound.name) {
|
|
364
364
|
return Promise.resolve(false);
|
|
@@ -371,8 +371,8 @@ let DebugService = class DebugService {
|
|
|
371
371
|
} else if (launch && launchesContainingName.length > 1 && launchesContainingName.indexOf(launch) >= 0) {
|
|
372
372
|
launchForName = launch;
|
|
373
373
|
} else {
|
|
374
|
-
throw ( new Error(launchesContainingName.length === 0 ? ( localize(
|
|
375
|
-
|
|
374
|
+
throw ( new Error(launchesContainingName.length === 0 ? ( localize(13865, "Could not find launch configuration '{0}' in the workspace.", name)) : ( localize(
|
|
375
|
+
13866,
|
|
376
376
|
"There are multiple launch configurations '{0}' in the workspace. Use folder name to qualify the configuration.",
|
|
377
377
|
name
|
|
378
378
|
))));
|
|
@@ -385,7 +385,7 @@ let DebugService = class DebugService {
|
|
|
385
385
|
launchForName = launchesMatchingConfigData[0];
|
|
386
386
|
} else {
|
|
387
387
|
throw ( new Error(( localize(
|
|
388
|
-
|
|
388
|
+
13867,
|
|
389
389
|
"Can not find folder with name '{0}' for configuration '{1}' in compound '{2}'.",
|
|
390
390
|
configData.folder,
|
|
391
391
|
configData.name,
|
|
@@ -394,17 +394,17 @@ let DebugService = class DebugService {
|
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
return this.createSession(launchForName, launchForName.getConfiguration(name), options);
|
|
397
|
-
}))
|
|
397
|
+
}));
|
|
398
398
|
const result = values.every(success => !!success);
|
|
399
399
|
this.endInitializingState();
|
|
400
400
|
return result;
|
|
401
401
|
}
|
|
402
402
|
if (configOrName && !config) {
|
|
403
403
|
const message = !!launch ? ( localize(
|
|
404
|
-
|
|
404
|
+
13868,
|
|
405
405
|
"Configuration '{0}' is missing in 'launch.json'.",
|
|
406
406
|
typeof configOrName === "string" ? configOrName : configOrName.name
|
|
407
|
-
)) : ( localize(
|
|
407
|
+
)) : ( localize(13869, "'launch.json' does not exist for passed workspace folder."));
|
|
408
408
|
throw ( new Error(message));
|
|
409
409
|
}
|
|
410
410
|
const result = await this.createSession(launch, config, options);
|
|
@@ -517,26 +517,26 @@ let DebugService = class DebugService {
|
|
|
517
517
|
let message;
|
|
518
518
|
if (configByProviders.request !== "attach" && configByProviders.request !== "launch") {
|
|
519
519
|
message = configByProviders.request ? ( localize(
|
|
520
|
-
|
|
520
|
+
13870,
|
|
521
521
|
"Attribute '{0}' has an unsupported value '{1}' in the chosen debug configuration.",
|
|
522
522
|
"request",
|
|
523
523
|
configByProviders.request
|
|
524
524
|
)) : ( localize(
|
|
525
|
-
|
|
525
|
+
13871,
|
|
526
526
|
"Attribute '{0}' is missing from the chosen debug configuration.",
|
|
527
527
|
"request"
|
|
528
528
|
));
|
|
529
529
|
} else {
|
|
530
530
|
message = resolvedConfig.type ? ( localize(
|
|
531
|
-
|
|
531
|
+
13872,
|
|
532
532
|
"Configured debug type '{0}' is not supported.",
|
|
533
533
|
resolvedConfig.type
|
|
534
|
-
)) : ( localize(
|
|
534
|
+
)) : ( localize(13873, "Missing property 'type' for the chosen launch configuration."));
|
|
535
535
|
}
|
|
536
536
|
const actionList = [];
|
|
537
537
|
actionList.push(toAction({
|
|
538
538
|
id: "installAdditionalDebuggers",
|
|
539
|
-
label: ( localize(
|
|
539
|
+
label: ( localize(13874, "Install {0} Extension", resolvedConfig.type)),
|
|
540
540
|
enabled: true,
|
|
541
541
|
run: async () => this.commandService.executeCommand("debug.installAdditionalDebuggers", resolvedConfig?.type)
|
|
542
542
|
}));
|
|
@@ -564,7 +564,7 @@ let DebugService = class DebugService {
|
|
|
564
564
|
await this.showError(err.message);
|
|
565
565
|
} else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
|
|
566
566
|
await this.showError(( localize(
|
|
567
|
-
|
|
567
|
+
13875,
|
|
568
568
|
"The active file can not be debugged. Make sure it is saved and that you have a debug extension installed for that file type."
|
|
569
569
|
)));
|
|
570
570
|
}
|
|
@@ -641,7 +641,7 @@ let DebugService = class DebugService {
|
|
|
641
641
|
async confirmConcurrentSession(sessionLabel) {
|
|
642
642
|
const result = await this.dialogService.confirm({
|
|
643
643
|
message: ( localize(
|
|
644
|
-
|
|
644
|
+
13876,
|
|
645
645
|
"'{0}' is already running. Do you want to start another instance?",
|
|
646
646
|
sessionLabel
|
|
647
647
|
))
|
|
@@ -693,7 +693,7 @@ let DebugService = class DebugService {
|
|
|
693
693
|
if (adapterExitEvent) {
|
|
694
694
|
if (adapterExitEvent.error) {
|
|
695
695
|
this.notificationService.error(( localize(
|
|
696
|
-
|
|
696
|
+
13877,
|
|
697
697
|
"Debug adapter process has terminated unexpectedly ({0})",
|
|
698
698
|
adapterExitEvent.error.message || ( adapterExitEvent.error.toString())
|
|
699
699
|
)));
|
|
@@ -900,7 +900,9 @@ let DebugService = class DebugService {
|
|
|
900
900
|
this.endInitializingState();
|
|
901
901
|
this.cancelTokens(undefined);
|
|
902
902
|
}
|
|
903
|
-
return Promise.all(
|
|
903
|
+
return Promise.all(
|
|
904
|
+
sessions.map(s => disconnect ? s.disconnect(undefined, suspend) : s.terminate())
|
|
905
|
+
);
|
|
904
906
|
}
|
|
905
907
|
async substituteVariables(launch, config) {
|
|
906
908
|
const dbg = this.adapterManager.getDebugger(config.type);
|
|
@@ -936,10 +938,10 @@ let DebugService = class DebugService {
|
|
|
936
938
|
await this.dialogService.prompt({
|
|
937
939
|
type: Severity.Error,
|
|
938
940
|
message,
|
|
939
|
-
buttons:
|
|
941
|
+
buttons: actions.map(action => ({
|
|
940
942
|
label: action.label,
|
|
941
943
|
run: () => action.run()
|
|
942
|
-
}))
|
|
944
|
+
})),
|
|
943
945
|
cancelButton: true
|
|
944
946
|
});
|
|
945
947
|
}
|
|
@@ -966,7 +968,7 @@ let DebugService = class DebugService {
|
|
|
966
968
|
if (lineNumber >= 1 && lineNumber <= model.getLineCount()) {
|
|
967
969
|
const lineContent = control.getModel().getLineContent(lineNumber);
|
|
968
970
|
alert(( localize(
|
|
969
|
-
|
|
971
|
+
13878,
|
|
970
972
|
"{0}, debugging paused {1}, {2}:{3}",
|
|
971
973
|
lineContent,
|
|
972
974
|
thread && thread.stoppedDetails ? `, reason ${thread.stoppedDetails.reason}` : "",
|
|
@@ -1033,7 +1035,7 @@ let DebugService = class DebugService {
|
|
|
1033
1035
|
async addBreakpoints(uri, rawBreakpoints, ariaAnnounce = true) {
|
|
1034
1036
|
const breakpoints = this.model.addBreakpoints(uri, rawBreakpoints);
|
|
1035
1037
|
if (ariaAnnounce) {
|
|
1036
|
-
breakpoints.forEach(bp => status(( localize(
|
|
1038
|
+
breakpoints.forEach(bp => status(( localize(13879, "Added breakpoint, line {0}, file {1}", bp.lineNumber, uri.fsPath))));
|
|
1037
1039
|
}
|
|
1038
1040
|
this.debugStorage.storeBreakpoints(this.model);
|
|
1039
1041
|
await this.sendBreakpoints(uri);
|
|
@@ -1054,16 +1056,16 @@ let DebugService = class DebugService {
|
|
|
1054
1056
|
const breakpoints = this.model.getBreakpoints();
|
|
1055
1057
|
const toRemove = id === undefined ? breakpoints : id instanceof Array ? breakpoints.filter(bp => id.includes(bp.getId())) : breakpoints.filter(bp => bp.getId() === id);
|
|
1056
1058
|
toRemove.forEach(bp => status(( localize(
|
|
1057
|
-
|
|
1059
|
+
13880,
|
|
1058
1060
|
"Removed breakpoint, line {0}, file {1}",
|
|
1059
1061
|
bp.lineNumber,
|
|
1060
1062
|
bp.uri.fsPath
|
|
1061
1063
|
))));
|
|
1062
|
-
const urisToClear = ( new Set(
|
|
1064
|
+
const urisToClear = ( new Set(toRemove.map(bp => ( bp.originalUri.toString()))));
|
|
1063
1065
|
this.model.removeBreakpoints(toRemove);
|
|
1064
1066
|
this.unlinkTriggeredBreakpoints(breakpoints, toRemove).forEach(uri => urisToClear.add(( uri.toString())));
|
|
1065
1067
|
this.debugStorage.storeBreakpoints(this.model);
|
|
1066
|
-
await Promise.all(
|
|
1068
|
+
await Promise.all([...urisToClear].map(uri => this.sendBreakpoints(( URI.parse(uri)))));
|
|
1067
1069
|
}
|
|
1068
1070
|
setBreakpointsActivated(activated) {
|
|
1069
1071
|
this.model.setBreakpointsActivated(activated);
|
|
@@ -1130,7 +1132,7 @@ let DebugService = class DebugService {
|
|
|
1130
1132
|
await this.sendExceptionBreakpoints();
|
|
1131
1133
|
}
|
|
1132
1134
|
async sendAllBreakpoints(session) {
|
|
1133
|
-
const setBreakpointsPromises =
|
|
1135
|
+
const setBreakpointsPromises = distinct(this.model.getBreakpoints(), bp => ( bp.originalUri.toString())).map(bp => this.sendBreakpoints(bp.originalUri, false, session));
|
|
1134
1136
|
if (session?.capabilities.supportsConfigurationDoneRequest) {
|
|
1135
1137
|
await Promise.all([
|
|
1136
1138
|
...setBreakpointsPromises,
|
|
@@ -1170,7 +1172,9 @@ let DebugService = class DebugService {
|
|
|
1170
1172
|
}
|
|
1171
1173
|
}
|
|
1172
1174
|
}
|
|
1173
|
-
await Promise.all(
|
|
1175
|
+
await Promise.all(
|
|
1176
|
+
this.model.getBreakpoints().filter(bp => bp.triggeredBy === breakpoint.getId() && bp.enabled !== enable).map(bp => this.enableOrDisableBreakpoints(enable, bp))
|
|
1177
|
+
);
|
|
1174
1178
|
}
|
|
1175
1179
|
async sendBreakpoints(modelUri, sourceModified = false, session) {
|
|
1176
1180
|
const breakpointsToSend = this.model.getBreakpoints({
|
|
@@ -1396,7 +1400,7 @@ async function sendToOneOrAllSessions(model, session, send) {
|
|
|
1396
1400
|
if (session) {
|
|
1397
1401
|
await send(session);
|
|
1398
1402
|
} else {
|
|
1399
|
-
await Promise.all(
|
|
1403
|
+
await Promise.all(model.getSessions().map(s => send(s)));
|
|
1400
1404
|
}
|
|
1401
1405
|
}
|
|
1402
1406
|
|