@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
|
@@ -102,7 +102,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
102
102
|
delta.added.forEach(added => {
|
|
103
103
|
added.value.forEach(rawAdapter => {
|
|
104
104
|
if (!rawAdapter.type || (typeof rawAdapter.type !== "string")) {
|
|
105
|
-
added.collector.error(( localize(
|
|
105
|
+
added.collector.error(( localize(13684, "Debugger 'type' can not be omitted and must be of type 'string'.")));
|
|
106
106
|
}
|
|
107
107
|
if (rawAdapter.type !== "*") {
|
|
108
108
|
const existing = this.getDebugger(rawAdapter.type);
|
|
@@ -124,21 +124,21 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
126
|
delta.removed.forEach(removed => {
|
|
127
|
-
const removedTypes =
|
|
127
|
+
const removedTypes = removed.value.map(rawAdapter => rawAdapter.type);
|
|
128
128
|
this.debuggers = this.debuggers.filter(d => removedTypes.indexOf(d.type) === -1);
|
|
129
129
|
});
|
|
130
130
|
this.updateDebugAdapterSchema();
|
|
131
131
|
this._onDidDebuggersExtPointRead.fire();
|
|
132
132
|
});
|
|
133
133
|
breakpointsExtPoint.setHandler(extensions => {
|
|
134
|
-
this.breakpointContributions = extensions.flatMap(ext =>
|
|
134
|
+
this.breakpointContributions = extensions.flatMap(ext => ext.value.map(
|
|
135
135
|
breakpoint => this.instantiationService.createInstance(Breakpoints, breakpoint)
|
|
136
|
-
))
|
|
136
|
+
));
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
updateTaskLabels() {
|
|
140
140
|
this.tasksService.getKnownTasks().then(tasks => {
|
|
141
|
-
this.taskLabels =
|
|
141
|
+
this.taskLabels = tasks.map(task => task._label);
|
|
142
142
|
this.updateDebugAdapterSchema();
|
|
143
143
|
});
|
|
144
144
|
}
|
|
@@ -151,7 +151,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
151
151
|
"name": {
|
|
152
152
|
type: "string",
|
|
153
153
|
description: ( localize(
|
|
154
|
-
|
|
154
|
+
13685,
|
|
155
155
|
"Name of configuration; appears in the launch configuration dropdown menu."
|
|
156
156
|
)),
|
|
157
157
|
default: "Launch"
|
|
@@ -159,7 +159,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
159
159
|
"debugServer": {
|
|
160
160
|
type: "number",
|
|
161
161
|
description: ( localize(
|
|
162
|
-
|
|
162
|
+
13686,
|
|
163
163
|
"For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode"
|
|
164
164
|
)),
|
|
165
165
|
default: 4711
|
|
@@ -175,7 +175,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
175
175
|
type: ""
|
|
176
176
|
}
|
|
177
177
|
}],
|
|
178
|
-
description: ( localize(
|
|
178
|
+
description: ( localize(13687, "Task to run before debug session starts.")),
|
|
179
179
|
examples: this.taskLabels
|
|
180
180
|
},
|
|
181
181
|
"postDebugTask": {
|
|
@@ -189,7 +189,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
189
189
|
type: ""
|
|
190
190
|
}
|
|
191
191
|
}],
|
|
192
|
-
description: ( localize(
|
|
192
|
+
description: ( localize(13688, "Task to run after debug session ends.")),
|
|
193
193
|
examples: this.taskLabels
|
|
194
194
|
},
|
|
195
195
|
"presentation": presentationSchema,
|
|
@@ -197,7 +197,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
197
197
|
"suppressMultipleSessionWarning": {
|
|
198
198
|
type: "boolean",
|
|
199
199
|
description: ( localize(
|
|
200
|
-
|
|
200
|
+
13689,
|
|
201
201
|
"Disable the warning when trying to start the same debug configuration more than once."
|
|
202
202
|
)),
|
|
203
203
|
default: true
|
|
@@ -353,11 +353,11 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
353
353
|
} = await this.dialogService.confirm({
|
|
354
354
|
type: Severity.Warning,
|
|
355
355
|
message: ( localize(
|
|
356
|
-
|
|
356
|
+
13690,
|
|
357
357
|
"You don't have an extension for debugging {0}. Should we find a {0} extension in the Marketplace?",
|
|
358
358
|
languageLabel
|
|
359
359
|
)),
|
|
360
|
-
primaryButton: ( localize(
|
|
360
|
+
primaryButton: ( localize(13691, "&&Find {0} extension", languageLabel))
|
|
361
361
|
});
|
|
362
362
|
if (confirmed) {
|
|
363
363
|
await this.commandService.executeCommand("debug.installAdditionalDebuggers", languageLabel);
|
|
@@ -384,13 +384,13 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
384
384
|
if (suggestedCandidates.length > 0) {
|
|
385
385
|
picks.push({
|
|
386
386
|
type: "separator",
|
|
387
|
-
label: ( localize(
|
|
388
|
-
}, ...
|
|
387
|
+
label: ( localize(13692, "Suggested"))
|
|
388
|
+
}, ...suggestedCandidates.map(c => ({
|
|
389
389
|
label: c.label,
|
|
390
390
|
pick: () => ({
|
|
391
391
|
debugger: c
|
|
392
392
|
})
|
|
393
|
-
})))
|
|
393
|
+
})));
|
|
394
394
|
}
|
|
395
395
|
if (otherCandidates.length > 0) {
|
|
396
396
|
if (picks.length > 0) {
|
|
@@ -399,12 +399,12 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
399
399
|
label: ""
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
-
picks.push(...
|
|
402
|
+
picks.push(...otherCandidates.map(c => ({
|
|
403
403
|
label: c.label,
|
|
404
404
|
pick: () => ({
|
|
405
405
|
debugger: c
|
|
406
406
|
})
|
|
407
|
-
})))
|
|
407
|
+
})));
|
|
408
408
|
}
|
|
409
409
|
if (dynamic.length) {
|
|
410
410
|
if (picks.length) {
|
|
@@ -415,7 +415,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
415
415
|
}
|
|
416
416
|
for (const d of dynamic) {
|
|
417
417
|
picks.push({
|
|
418
|
-
label: ( localize(
|
|
418
|
+
label: ( localize(13693, "More {0} options...", d.label)),
|
|
419
419
|
pick: async () => {
|
|
420
420
|
const cfg = await d.pick();
|
|
421
421
|
if (!cfg) {
|
|
@@ -433,7 +433,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
433
433
|
type: "separator",
|
|
434
434
|
label: ""
|
|
435
435
|
}, {
|
|
436
|
-
label: languageLabel ? ( localize(
|
|
436
|
+
label: languageLabel ? ( localize(13694, "Install an extension for {0}...", languageLabel)) : ( localize(13695, "Install extension..."))
|
|
437
437
|
});
|
|
438
438
|
const contributed = this.menuService.getMenuActions(MenuId.DebugCreateConfiguration, this.contextKeyService);
|
|
439
439
|
for (const [, action] of contributed) {
|
|
@@ -441,7 +441,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
441
441
|
picks.push(item);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
const placeHolder = ( localize(
|
|
444
|
+
const placeHolder = ( localize(13696, "Select debugger"));
|
|
445
445
|
return this.quickInputService.pick(picks, {
|
|
446
446
|
activeItem: picks[0],
|
|
447
447
|
placeHolder
|
|
@@ -31,7 +31,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
31
31
|
constructor(debugService) {
|
|
32
32
|
this.debugService = debugService;
|
|
33
33
|
this.type = "pickerPick";
|
|
34
|
-
this.label = ( localize(
|
|
34
|
+
this.label = ( localize(13697, "Debug Session..."));
|
|
35
35
|
this.icon = Codicon.debug;
|
|
36
36
|
this.ordinal = -200;
|
|
37
37
|
}
|
|
@@ -46,7 +46,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
46
46
|
const query = observableValue("debugPicker.query", "");
|
|
47
47
|
const picksObservable = this.createPicksObservable(mode, query, store);
|
|
48
48
|
return {
|
|
49
|
-
placeholder: ( localize(
|
|
49
|
+
placeholder: ( localize(13698, "Select debug data to attach")),
|
|
50
50
|
picks: (_queryObs, token) => {
|
|
51
51
|
store.add(autorun(reader => {
|
|
52
52
|
query.set(_queryObs.read(reader), undefined);
|
|
@@ -80,13 +80,13 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
80
80
|
const promise = derived(_reader => {
|
|
81
81
|
return ( new ObservablePromise(this.buildMainPicks(mode)));
|
|
82
82
|
});
|
|
83
|
-
return
|
|
83
|
+
return promise.map((value, reader) => {
|
|
84
84
|
const result = value.promiseResult.read(reader);
|
|
85
85
|
return {
|
|
86
86
|
picks: result?.data || [],
|
|
87
87
|
busy: result === undefined
|
|
88
88
|
};
|
|
89
|
-
})
|
|
89
|
+
});
|
|
90
90
|
}
|
|
91
91
|
async buildMainPicks(mode) {
|
|
92
92
|
const picks = [];
|
|
@@ -97,7 +97,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
97
97
|
return picks;
|
|
98
98
|
}
|
|
99
99
|
picks.push({
|
|
100
|
-
label: ( localize(
|
|
100
|
+
label: ( localize(13699, "Expression Value...")),
|
|
101
101
|
iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
|
|
102
102
|
asAttachment: () => {
|
|
103
103
|
mode.set(PickerMode.Expression, undefined);
|
|
@@ -108,7 +108,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
108
108
|
if (watches.length > 0) {
|
|
109
109
|
picks.push({
|
|
110
110
|
type: "separator",
|
|
111
|
-
label: ( localize(
|
|
111
|
+
label: ( localize(13700, "Watch Expressions"))
|
|
112
112
|
});
|
|
113
113
|
for (const watch of watches) {
|
|
114
114
|
picks.push({
|
|
@@ -135,7 +135,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
135
135
|
const variables = await scope.getChildren();
|
|
136
136
|
if (variables.length > 1) {
|
|
137
137
|
picks.push({
|
|
138
|
-
label: ( localize(
|
|
138
|
+
label: ( localize(13701, "All variables in {0}", scope.name)),
|
|
139
139
|
iconClass: ThemeIcon.asClassName(Codicon.symbolNamespace),
|
|
140
140
|
asAttachment: () => createDebugAttachments(stackFrame, createScopeEntry(scope, variables))
|
|
141
141
|
});
|
|
@@ -159,18 +159,18 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
159
159
|
reader.store.add(toDisposable(() => cts.dispose(true)));
|
|
160
160
|
return ( new ObservablePromise(this.evaluateExpression(queryValue, cts.token)));
|
|
161
161
|
});
|
|
162
|
-
return
|
|
162
|
+
return promise.map((value, r) => {
|
|
163
163
|
const result = value.promiseResult.read(r);
|
|
164
164
|
return {
|
|
165
165
|
picks: result?.data || [],
|
|
166
166
|
busy: result === undefined
|
|
167
167
|
};
|
|
168
|
-
})
|
|
168
|
+
});
|
|
169
169
|
}
|
|
170
170
|
async evaluateExpression(expression, token) {
|
|
171
171
|
if (!expression.trim()) {
|
|
172
172
|
return [{
|
|
173
|
-
label: ( localize(
|
|
173
|
+
label: ( localize(13702, "Type an expression to evaluate...")),
|
|
174
174
|
disabled: true,
|
|
175
175
|
asAttachment: () => "noop"
|
|
176
176
|
}];
|
|
@@ -180,7 +180,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
180
180
|
const stackFrame = viewModel.focusedStackFrame;
|
|
181
181
|
if (!session || !stackFrame) {
|
|
182
182
|
return [{
|
|
183
|
-
label: ( localize(
|
|
183
|
+
label: ( localize(13703, "No active debug session")),
|
|
184
184
|
disabled: true,
|
|
185
185
|
asAttachment: () => "noop"
|
|
186
186
|
}];
|
|
@@ -212,7 +212,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
212
212
|
} else {
|
|
213
213
|
return [{
|
|
214
214
|
label: expression,
|
|
215
|
-
description: ( localize(
|
|
215
|
+
description: ( localize(13704, "No result")),
|
|
216
216
|
disabled: true,
|
|
217
217
|
asAttachment: () => "noop"
|
|
218
218
|
}];
|
|
@@ -220,7 +220,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
|
|
|
220
220
|
} catch (err) {
|
|
221
221
|
return [{
|
|
222
222
|
label: expression,
|
|
223
|
-
description: err instanceof Error ? err.message : ( localize(
|
|
223
|
+
description: err instanceof Error ? err.message : ( localize(13705, "Evaluation error")),
|
|
224
224
|
disabled: true,
|
|
225
225
|
asAttachment: () => "noop"
|
|
226
226
|
}];
|
|
@@ -262,7 +262,7 @@ function createDebugAttachments(stackFrame, variableEntry) {
|
|
|
262
262
|
return [createPausedLocationEntry(stackFrame), variableEntry];
|
|
263
263
|
}
|
|
264
264
|
function createScopeEntry(scope, variables) {
|
|
265
|
-
const variablesSummary =
|
|
265
|
+
const variablesSummary = variables.map(v => `${v.name}: ${v.value}`).join("\n");
|
|
266
266
|
return {
|
|
267
267
|
kind: "debugVariable",
|
|
268
268
|
id: `debug-scope:${scope.name}`,
|
|
@@ -313,7 +313,7 @@ registerAction2(class extends Action2 {
|
|
|
313
313
|
constructor() {
|
|
314
314
|
super({
|
|
315
315
|
id: "workbench.debug.action.addVariableToChat",
|
|
316
|
-
title: ( localize(
|
|
316
|
+
title: ( localize(13706, "Add to Chat")),
|
|
317
317
|
f1: false,
|
|
318
318
|
menu: {
|
|
319
319
|
id: MenuId.DebugVariablesContext,
|
|
@@ -344,7 +344,7 @@ registerAction2(class extends Action2 {
|
|
|
344
344
|
constructor() {
|
|
345
345
|
super({
|
|
346
346
|
id: "workbench.debug.action.addWatchExpressionToChat",
|
|
347
|
-
title: ( localize(
|
|
347
|
+
title: ( localize(13706, "Add to Chat")),
|
|
348
348
|
f1: false,
|
|
349
349
|
menu: {
|
|
350
350
|
id: MenuId.DebugWatchContext,
|
|
@@ -372,7 +372,7 @@ registerAction2(class extends Action2 {
|
|
|
372
372
|
constructor() {
|
|
373
373
|
super({
|
|
374
374
|
id: "workbench.debug.action.addScopeToChat",
|
|
375
|
-
title: ( localize(
|
|
375
|
+
title: ( localize(13706, "Add to Chat")),
|
|
376
376
|
f1: false,
|
|
377
377
|
menu: {
|
|
378
378
|
id: MenuId.DebugScopesContext,
|
|
@@ -169,18 +169,18 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
169
169
|
this.configProviders.filter(p => p.type === "*" && p.resolveDebugConfigurationWithSubstitutedVariables)
|
|
170
170
|
);
|
|
171
171
|
let result = config;
|
|
172
|
-
await sequence(
|
|
172
|
+
await sequence(providers.map(provider => async () => {
|
|
173
173
|
if (result) {
|
|
174
174
|
result = await provider.resolveDebugConfigurationWithSubstitutedVariables(folderUri, result, token);
|
|
175
175
|
}
|
|
176
|
-
}))
|
|
176
|
+
}));
|
|
177
177
|
return result;
|
|
178
178
|
}
|
|
179
179
|
async provideDebugConfigurations(folderUri, type, token) {
|
|
180
180
|
await this.adapterManager.activateDebuggers("onDebugInitialConfigurations");
|
|
181
|
-
const results = await Promise.all(
|
|
181
|
+
const results = await Promise.all(this.configProviders.filter(
|
|
182
182
|
p => p.type === type && p.triggerKind === DebugConfigurationProviderTriggerKind.Initial && p.provideDebugConfigurations
|
|
183
|
-
).map(p => p.provideDebugConfigurations(folderUri, token)))
|
|
183
|
+
).map(p => p.provideDebugConfigurations(folderUri, token)));
|
|
184
184
|
return results.reduce((first, second) => first.concat(second), []);
|
|
185
185
|
}
|
|
186
186
|
async getDynamicProviders() {
|
|
@@ -213,7 +213,7 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
213
213
|
debugDynamicExtensionsTypes.add(configProvider.type);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return [...debugDynamicExtensionsTypes].map(type => {
|
|
217
217
|
return {
|
|
218
218
|
label: this.adapterManager.getDebuggerLabel(type),
|
|
219
219
|
getProvider: async () => {
|
|
@@ -230,7 +230,7 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
230
230
|
disposables.add(token);
|
|
231
231
|
const input = disposables.add(this.quickInputService.createQuickPick());
|
|
232
232
|
input.busy = true;
|
|
233
|
-
input.placeholder = ( localize(
|
|
233
|
+
input.placeholder = ( localize(13757, "Select Launch Configuration"));
|
|
234
234
|
const chosenPromise = ( new Promise(resolve => {
|
|
235
235
|
disposables.add(input.onDidAccept(() => resolve(input.activeItems[0])));
|
|
236
236
|
disposables.add(input.onDidTriggerItemButton(async context => {
|
|
@@ -266,7 +266,7 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
266
266
|
return chosen;
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
|
-
})
|
|
269
|
+
});
|
|
270
270
|
}
|
|
271
271
|
async getDynamicConfigurationsByType(type, token = CancellationToken.None) {
|
|
272
272
|
await this.adapterManager.activateDebuggers(ON_DEBUG_DYNAMIC_CONFIGURATIONS_NAME, type);
|
|
@@ -277,16 +277,16 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
277
277
|
this.getLaunches().forEach(launch => {
|
|
278
278
|
if (provider) {
|
|
279
279
|
picks.push(
|
|
280
|
-
provider.provideDebugConfigurations(launch.workspace?.uri, token).then(configurations =>
|
|
280
|
+
provider.provideDebugConfigurations(launch.workspace?.uri, token).then(configurations => configurations.map(config => ({
|
|
281
281
|
label: config.name,
|
|
282
282
|
description: launch.name,
|
|
283
283
|
config,
|
|
284
284
|
buttons: [{
|
|
285
285
|
iconClass: ThemeIcon.asClassName(debugConfigure),
|
|
286
|
-
tooltip: ( localize(
|
|
286
|
+
tooltip: ( localize(13758, "Edit Debug Configuration in launch.json"))
|
|
287
287
|
}],
|
|
288
288
|
launch
|
|
289
|
-
})))
|
|
289
|
+
})))
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
});
|
|
@@ -347,9 +347,9 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
347
347
|
}));
|
|
348
348
|
}
|
|
349
349
|
initLaunches() {
|
|
350
|
-
this.launches =
|
|
350
|
+
this.launches = this.contextService.getWorkspace().folders.map(
|
|
351
351
|
folder => this.instantiationService.createInstance(Launch, this, this.adapterManager, folder)
|
|
352
|
-
)
|
|
352
|
+
);
|
|
353
353
|
if (this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
|
|
354
354
|
this.launches.push(
|
|
355
355
|
this.instantiationService.createInstance(WorkspaceLaunch, this, this.adapterManager)
|
|
@@ -364,10 +364,10 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
364
364
|
}
|
|
365
365
|
setCompoundSchemaValues() {
|
|
366
366
|
const compoundConfigurationsSchema = launchSchema.properties["compounds"].items.properties["configurations"];
|
|
367
|
-
const launchNames =
|
|
367
|
+
const launchNames = this.launches.map(l => l.getConfigurationNames(true)).reduce((first, second) => first.concat(second), []);
|
|
368
368
|
compoundConfigurationsSchema.items.oneOf[0].enum = launchNames;
|
|
369
369
|
compoundConfigurationsSchema.items.oneOf[1].properties.name.enum = launchNames;
|
|
370
|
-
const folderNames =
|
|
370
|
+
const folderNames = this.contextService.getWorkspace().folders.map(f => f.name);
|
|
371
371
|
compoundConfigurationsSchema.items.oneOf[1].properties.folder.enum = folderNames;
|
|
372
372
|
jsonRegistry.registerSchema(launchSchemaId, launchSchema);
|
|
373
373
|
}
|
|
@@ -429,7 +429,7 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
429
429
|
if (!config) {
|
|
430
430
|
const providers = (await this.getDynamicProviders()).filter(p => p.type === type);
|
|
431
431
|
this.getSelectedConfig = async () => {
|
|
432
|
-
const activatedProviders = await Promise.all(
|
|
432
|
+
const activatedProviders = await Promise.all(providers.map(p => p.getProvider()));
|
|
433
433
|
const provider = activatedProviders.length > 0 ? activatedProviders[0] : undefined;
|
|
434
434
|
if (provider && launch && launch.workspace) {
|
|
435
435
|
const token = ( new CancellationTokenSource());
|
|
@@ -524,17 +524,17 @@ class AbstractLaunch {
|
|
|
524
524
|
);
|
|
525
525
|
}
|
|
526
526
|
if (ignoreCompoundsAndPresentation) {
|
|
527
|
-
return
|
|
527
|
+
return configurations.map(c => c.name);
|
|
528
528
|
}
|
|
529
529
|
if (config.compounds) {
|
|
530
530
|
configurations.push(...config.compounds.filter(
|
|
531
531
|
compound => typeof compound.name === "string" && compound.configurations && compound.configurations.length
|
|
532
532
|
));
|
|
533
533
|
}
|
|
534
|
-
const resolved =
|
|
534
|
+
const resolved = configurations.map(
|
|
535
535
|
c => isDebugConfig(c) ? getEffectiveConfigForPlatform(c, this.configurationManager.getTargetOperatingSystem()) : c
|
|
536
|
-
)
|
|
537
|
-
return
|
|
536
|
+
);
|
|
537
|
+
return getVisibleAndSorted(resolved).map(c => c.name);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
getConfiguration(name) {
|
|
@@ -596,14 +596,14 @@ class AbstractLaunch {
|
|
|
596
596
|
}
|
|
597
597
|
function distinguishConfigsByName(things) {
|
|
598
598
|
const seen = ( new Map());
|
|
599
|
-
return
|
|
599
|
+
return things.map(thing => {
|
|
600
600
|
const no = seen.get(thing.name) || 0;
|
|
601
601
|
seen.set(thing.name, no + 1);
|
|
602
602
|
return no === 0 ? thing : {
|
|
603
603
|
...thing,
|
|
604
604
|
name: `${thing.name} (${no})`
|
|
605
605
|
};
|
|
606
|
-
})
|
|
606
|
+
});
|
|
607
607
|
}
|
|
608
608
|
let Launch = class Launch extends AbstractLaunch {
|
|
609
609
|
constructor(
|
|
@@ -660,7 +660,7 @@ let Launch = class Launch extends AbstractLaunch {
|
|
|
660
660
|
await this.textFileService.write(resource, content);
|
|
661
661
|
} catch (error) {
|
|
662
662
|
throw ( new Error(( localize(
|
|
663
|
-
|
|
663
|
+
13759,
|
|
664
664
|
"Unable to create 'launch.json' file inside the '.vscode' folder ({0}).",
|
|
665
665
|
error.message
|
|
666
666
|
))));
|
|
@@ -722,7 +722,7 @@ let WorkspaceLaunch = class WorkspaceLaunch extends AbstractLaunch {
|
|
|
722
722
|
return this.contextService.getWorkspace().configuration;
|
|
723
723
|
}
|
|
724
724
|
get name() {
|
|
725
|
-
return localize(
|
|
725
|
+
return localize(13760, "workspace");
|
|
726
726
|
}
|
|
727
727
|
getConfig() {
|
|
728
728
|
return this.configurationService.inspect("launch").workspaceValue;
|
|
@@ -778,7 +778,7 @@ let UserLaunch = class UserLaunch extends AbstractLaunch {
|
|
|
778
778
|
return this.preferencesService.userSettingsResource;
|
|
779
779
|
}
|
|
780
780
|
get name() {
|
|
781
|
-
return localize(
|
|
781
|
+
return localize(13761, "user settings");
|
|
782
782
|
}
|
|
783
783
|
get hidden() {
|
|
784
784
|
return true;
|
|
@@ -31,7 +31,7 @@ let DebugConsoleQuickAccess = class DebugConsoleQuickAccess extends PickerQuickA
|
|
|
31
31
|
type: "separator"
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
const createTerminalLabel = ( localize(
|
|
34
|
+
const createTerminalLabel = ( localize(13762, "Start a New Debug Session"));
|
|
35
35
|
debugConsolePicks.push({
|
|
36
36
|
label: `$(plus) ${createTerminalLabel}`,
|
|
37
37
|
ariaLabel: createTerminalLabel,
|