@codingame/monaco-vscode-debug-service-override 1.82.4 → 1.82.5-next.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/debug.d.ts +5 -0
- package/debug.js +24 -0
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/package.json +2 -2
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +44 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +200 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +785 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +399 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1298 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +960 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +497 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +347 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +299 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +400 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +827 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +621 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +60 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +527 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +681 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +356 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +206 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +82 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +143 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +1174 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +1144 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +106 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +68 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +275 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +314 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +168 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +663 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +105 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +231 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +631 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +695 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +953 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +48 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +336 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +98 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +575 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +415 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +102 -0
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +21 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +17 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +100 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +59 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1482 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +346 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +123 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +175 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +36 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +117 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +260 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +27 -0
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +83 -0
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +283 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +305 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +28 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +176 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +12 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { flatten, distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
3
|
+
import { sequence } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
4
|
+
import { CancellationTokenSource, CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
5
|
+
import { Emitter, Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
|
+
import * as json from 'monaco-editor/esm/vs/base/common/json.js';
|
|
7
|
+
import { DisposableStore, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
8
|
+
import * as objects from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
9
|
+
import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
10
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
11
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
12
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
13
|
+
import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
14
|
+
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
15
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
16
|
+
import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
17
|
+
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
18
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
19
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
20
|
+
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
21
|
+
import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/common/uriIdentity.js';
|
|
22
|
+
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
23
|
+
import { debugConfigure } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
24
|
+
import { CONTEXT_DEBUG_CONFIGURATION_TYPE, DebugConfigurationProviderTriggerKind } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
25
|
+
import { launchSchema } from '../common/debugSchemas.js';
|
|
26
|
+
import { getVisibleAndSorted } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
27
|
+
import { launchSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
|
|
28
|
+
import { ACTIVE_GROUP, IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
29
|
+
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
30
|
+
import { IHistoryService } from 'vscode/vscode/vs/workbench/services/history/common/history';
|
|
31
|
+
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences';
|
|
32
|
+
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles';
|
|
33
|
+
|
|
34
|
+
const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
35
|
+
jsonRegistry.registerSchema(launchSchemaId, launchSchema);
|
|
36
|
+
const DEBUG_SELECTED_CONFIG_NAME_KEY = 'debug.selectedconfigname';
|
|
37
|
+
const DEBUG_SELECTED_ROOT = 'debug.selectedroot';
|
|
38
|
+
const DEBUG_SELECTED_TYPE = 'debug.selectedtype';
|
|
39
|
+
const DEBUG_RECENT_DYNAMIC_CONFIGURATIONS = 'debug.recentdynamicconfigurations';
|
|
40
|
+
let ConfigurationManager = class ConfigurationManager {
|
|
41
|
+
constructor(adapterManager, contextService, configurationService, quickInputService, instantiationService, storageService, extensionService, historyService, uriIdentityService, contextKeyService) {
|
|
42
|
+
this.adapterManager = adapterManager;
|
|
43
|
+
this.contextService = contextService;
|
|
44
|
+
this.configurationService = configurationService;
|
|
45
|
+
this.quickInputService = quickInputService;
|
|
46
|
+
this.instantiationService = instantiationService;
|
|
47
|
+
this.storageService = storageService;
|
|
48
|
+
this.extensionService = extensionService;
|
|
49
|
+
this.historyService = historyService;
|
|
50
|
+
this.uriIdentityService = uriIdentityService;
|
|
51
|
+
this.getSelectedConfig = () => Promise.resolve(undefined);
|
|
52
|
+
this.selectedDynamic = false;
|
|
53
|
+
this._onDidSelectConfigurationName = ( new Emitter());
|
|
54
|
+
this.configProviders = [];
|
|
55
|
+
this.toDispose = [];
|
|
56
|
+
this.initLaunches();
|
|
57
|
+
this.setCompoundSchemaValues();
|
|
58
|
+
this.registerListeners();
|
|
59
|
+
const previousSelectedRoot = this.storageService.get(DEBUG_SELECTED_ROOT, 1 );
|
|
60
|
+
const previousSelectedType = this.storageService.get(DEBUG_SELECTED_TYPE, 1 );
|
|
61
|
+
const previousSelectedLaunch = this.launches.find(l => ( l.uri.toString()) === previousSelectedRoot);
|
|
62
|
+
const previousSelectedName = this.storageService.get(DEBUG_SELECTED_CONFIG_NAME_KEY, 1 );
|
|
63
|
+
this.debugConfigurationTypeContext = CONTEXT_DEBUG_CONFIGURATION_TYPE.bindTo(contextKeyService);
|
|
64
|
+
const dynamicConfig = previousSelectedType ? { type: previousSelectedType } : undefined;
|
|
65
|
+
if (previousSelectedLaunch && previousSelectedLaunch.getConfigurationNames().length) {
|
|
66
|
+
this.selectConfiguration(previousSelectedLaunch, previousSelectedName, undefined, dynamicConfig);
|
|
67
|
+
}
|
|
68
|
+
else if (this.launches.length > 0) {
|
|
69
|
+
this.selectConfiguration(undefined, previousSelectedName, undefined, dynamicConfig);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
registerDebugConfigurationProvider(debugConfigurationProvider) {
|
|
73
|
+
this.configProviders.push(debugConfigurationProvider);
|
|
74
|
+
return {
|
|
75
|
+
dispose: () => {
|
|
76
|
+
this.unregisterDebugConfigurationProvider(debugConfigurationProvider);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
unregisterDebugConfigurationProvider(debugConfigurationProvider) {
|
|
81
|
+
const ix = this.configProviders.indexOf(debugConfigurationProvider);
|
|
82
|
+
if (ix >= 0) {
|
|
83
|
+
this.configProviders.splice(ix, 1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
hasDebugConfigurationProvider(debugType, triggerKind) {
|
|
87
|
+
if (triggerKind === undefined) {
|
|
88
|
+
triggerKind = DebugConfigurationProviderTriggerKind.Initial;
|
|
89
|
+
}
|
|
90
|
+
const provider = this.configProviders.find(p => p.provideDebugConfigurations && (p.type === debugType) && (p.triggerKind === triggerKind));
|
|
91
|
+
return !!provider;
|
|
92
|
+
}
|
|
93
|
+
async resolveConfigurationByProviders(folderUri, type, config, token) {
|
|
94
|
+
const resolveDebugConfigurationForType = async (type, config) => {
|
|
95
|
+
if (type !== '*') {
|
|
96
|
+
await this.adapterManager.activateDebuggers('onDebugResolve', type);
|
|
97
|
+
}
|
|
98
|
+
for (const p of this.configProviders) {
|
|
99
|
+
if (p.type === type && p.resolveDebugConfiguration && config) {
|
|
100
|
+
config = await p.resolveDebugConfiguration(folderUri, config, token);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return config;
|
|
104
|
+
};
|
|
105
|
+
let resolvedType = config.type ?? type;
|
|
106
|
+
let result = config;
|
|
107
|
+
for (let seen = ( new Set()); result && !( seen.has(resolvedType));) {
|
|
108
|
+
seen.add(resolvedType);
|
|
109
|
+
result = await resolveDebugConfigurationForType(resolvedType, result);
|
|
110
|
+
result = await resolveDebugConfigurationForType('*', result);
|
|
111
|
+
resolvedType = result?.type ?? type;
|
|
112
|
+
}
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
async resolveDebugConfigurationWithSubstitutedVariables(folderUri, type, config, token) {
|
|
116
|
+
const providers = this.configProviders.filter(p => p.type === type && p.resolveDebugConfigurationWithSubstitutedVariables)
|
|
117
|
+
.concat(this.configProviders.filter(p => p.type === '*' && p.resolveDebugConfigurationWithSubstitutedVariables));
|
|
118
|
+
let result = config;
|
|
119
|
+
await sequence(( providers.map(provider => async () => {
|
|
120
|
+
if (result) {
|
|
121
|
+
result = await provider.resolveDebugConfigurationWithSubstitutedVariables(folderUri, result, token);
|
|
122
|
+
}
|
|
123
|
+
})));
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
async provideDebugConfigurations(folderUri, type, token) {
|
|
127
|
+
await this.adapterManager.activateDebuggers('onDebugInitialConfigurations');
|
|
128
|
+
const results = await Promise.all(( this.configProviders.filter(p => p.type === type && p.triggerKind === DebugConfigurationProviderTriggerKind.Initial && p.provideDebugConfigurations).map(p => p.provideDebugConfigurations(folderUri, token))));
|
|
129
|
+
return results.reduce((first, second) => first.concat(second), []);
|
|
130
|
+
}
|
|
131
|
+
async getDynamicProviders() {
|
|
132
|
+
await this.extensionService.whenInstalledExtensionsRegistered();
|
|
133
|
+
const onDebugDynamicConfigurationsName = 'onDebugDynamicConfigurations';
|
|
134
|
+
const debugDynamicExtensionsTypes = this.extensionService.extensions.reduce((acc, e) => {
|
|
135
|
+
if (!e.activationEvents) {
|
|
136
|
+
return acc;
|
|
137
|
+
}
|
|
138
|
+
const explicitTypes = [];
|
|
139
|
+
let hasGenericEvent = false;
|
|
140
|
+
for (const event of e.activationEvents) {
|
|
141
|
+
if (event === onDebugDynamicConfigurationsName) {
|
|
142
|
+
hasGenericEvent = true;
|
|
143
|
+
}
|
|
144
|
+
else if (event.startsWith(`${onDebugDynamicConfigurationsName}:`)) {
|
|
145
|
+
explicitTypes.push(event.slice(onDebugDynamicConfigurationsName.length + 1));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (explicitTypes.length) {
|
|
149
|
+
return acc.concat(explicitTypes);
|
|
150
|
+
}
|
|
151
|
+
if (hasGenericEvent) {
|
|
152
|
+
const debuggerType = e.contributes?.debuggers?.[0].type;
|
|
153
|
+
return debuggerType ? acc.concat(debuggerType) : acc;
|
|
154
|
+
}
|
|
155
|
+
return acc;
|
|
156
|
+
}, []);
|
|
157
|
+
return ( debugDynamicExtensionsTypes.map(type => {
|
|
158
|
+
return {
|
|
159
|
+
label: this.adapterManager.getDebuggerLabel(type),
|
|
160
|
+
getProvider: async () => {
|
|
161
|
+
await this.adapterManager.activateDebuggers(onDebugDynamicConfigurationsName, type);
|
|
162
|
+
return this.configProviders.find(p => p.type === type && p.triggerKind === DebugConfigurationProviderTriggerKind.Dynamic && p.provideDebugConfigurations);
|
|
163
|
+
},
|
|
164
|
+
type,
|
|
165
|
+
pick: async () => {
|
|
166
|
+
await this.adapterManager.activateDebuggers(onDebugDynamicConfigurationsName, type);
|
|
167
|
+
const token = ( new CancellationTokenSource());
|
|
168
|
+
const picks = [];
|
|
169
|
+
const provider = this.configProviders.find(p => p.type === type && p.triggerKind === DebugConfigurationProviderTriggerKind.Dynamic && p.provideDebugConfigurations);
|
|
170
|
+
this.getLaunches().forEach(launch => {
|
|
171
|
+
if (launch.workspace && provider) {
|
|
172
|
+
picks.push(provider.provideDebugConfigurations(launch.workspace.uri, token.token).then(configurations => ( configurations.map(config => ({
|
|
173
|
+
label: config.name,
|
|
174
|
+
description: launch.name,
|
|
175
|
+
config,
|
|
176
|
+
buttons: [{
|
|
177
|
+
iconClass: ThemeIcon.asClassName(debugConfigure),
|
|
178
|
+
tooltip: ( nls.localize('editLaunchConfig', "Edit Debug Configuration in launch.json"))
|
|
179
|
+
}],
|
|
180
|
+
launch
|
|
181
|
+
})))));
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
const disposables = ( new DisposableStore());
|
|
185
|
+
const input = disposables.add(this.quickInputService.createQuickPick());
|
|
186
|
+
input.busy = true;
|
|
187
|
+
input.placeholder = ( nls.localize('selectConfiguration', "Select Launch Configuration"));
|
|
188
|
+
const chosenPromise = ( new Promise(resolve => {
|
|
189
|
+
disposables.add(input.onDidAccept(() => resolve(input.activeItems[0])));
|
|
190
|
+
disposables.add(input.onDidTriggerItemButton(async (context) => {
|
|
191
|
+
resolve(undefined);
|
|
192
|
+
const { launch, config } = context.item;
|
|
193
|
+
await launch.openConfigFile({ preserveFocus: false, type: config.type, suppressInitialConfigs: true });
|
|
194
|
+
await launch.writeConfiguration(config);
|
|
195
|
+
await this.selectConfiguration(launch, config.name);
|
|
196
|
+
this.removeRecentDynamicConfigurations(config.name, config.type);
|
|
197
|
+
}));
|
|
198
|
+
}));
|
|
199
|
+
const nestedPicks = await Promise.all(picks);
|
|
200
|
+
const items = flatten(nestedPicks);
|
|
201
|
+
input.items = items;
|
|
202
|
+
input.busy = false;
|
|
203
|
+
input.show();
|
|
204
|
+
const chosen = await chosenPromise;
|
|
205
|
+
disposables.dispose();
|
|
206
|
+
if (!chosen) {
|
|
207
|
+
token.cancel();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
return chosen;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
getAllConfigurations() {
|
|
216
|
+
const all = [];
|
|
217
|
+
for (const l of this.launches) {
|
|
218
|
+
for (const name of l.getConfigurationNames()) {
|
|
219
|
+
const config = l.getConfiguration(name) || l.getCompound(name);
|
|
220
|
+
if (config) {
|
|
221
|
+
all.push({ launch: l, name, presentation: config.presentation });
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return getVisibleAndSorted(all);
|
|
226
|
+
}
|
|
227
|
+
removeRecentDynamicConfigurations(name, type) {
|
|
228
|
+
const remaining = this.getRecentDynamicConfigurations().filter(c => c.name !== name || c.type !== type);
|
|
229
|
+
this.storageService.store(DEBUG_RECENT_DYNAMIC_CONFIGURATIONS, JSON.stringify(remaining), 1 , 1 );
|
|
230
|
+
if (this.selectedConfiguration.name === name && this.selectedType === type && this.selectedDynamic) {
|
|
231
|
+
this.selectConfiguration(undefined, undefined);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
this._onDidSelectConfigurationName.fire();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
getRecentDynamicConfigurations() {
|
|
238
|
+
return JSON.parse(this.storageService.get(DEBUG_RECENT_DYNAMIC_CONFIGURATIONS, 1 , '[]'));
|
|
239
|
+
}
|
|
240
|
+
registerListeners() {
|
|
241
|
+
this.toDispose.push(Event.any(this.contextService.onDidChangeWorkspaceFolders, this.contextService.onDidChangeWorkbenchState)(() => {
|
|
242
|
+
this.initLaunches();
|
|
243
|
+
this.selectConfiguration(undefined);
|
|
244
|
+
this.setCompoundSchemaValues();
|
|
245
|
+
}));
|
|
246
|
+
this.toDispose.push(this.configurationService.onDidChangeConfiguration(async (e) => {
|
|
247
|
+
if (e.affectsConfiguration('launch')) {
|
|
248
|
+
await this.selectConfiguration(undefined);
|
|
249
|
+
this.setCompoundSchemaValues();
|
|
250
|
+
}
|
|
251
|
+
}));
|
|
252
|
+
this.toDispose.push(this.adapterManager.onDidDebuggersExtPointRead(() => {
|
|
253
|
+
this.setCompoundSchemaValues();
|
|
254
|
+
}));
|
|
255
|
+
}
|
|
256
|
+
initLaunches() {
|
|
257
|
+
this.launches = ( this.contextService.getWorkspace().folders.map(
|
|
258
|
+
folder => this.instantiationService.createInstance(Launch, this, this.adapterManager, folder)
|
|
259
|
+
));
|
|
260
|
+
if (this.contextService.getWorkbenchState() === 3 ) {
|
|
261
|
+
this.launches.push(this.instantiationService.createInstance(WorkspaceLaunch, this, this.adapterManager));
|
|
262
|
+
}
|
|
263
|
+
this.launches.push(this.instantiationService.createInstance(UserLaunch, this, this.adapterManager));
|
|
264
|
+
if (this.selectedLaunch && this.launches.indexOf(this.selectedLaunch) === -1) {
|
|
265
|
+
this.selectConfiguration(undefined);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
setCompoundSchemaValues() {
|
|
269
|
+
const compoundConfigurationsSchema = launchSchema.properties['compounds'].items.properties['configurations'];
|
|
270
|
+
const launchNames = ( this.launches.map(l => l.getConfigurationNames(true))).reduce((first, second) => first.concat(second), []);
|
|
271
|
+
compoundConfigurationsSchema.items.oneOf[0].enum = launchNames;
|
|
272
|
+
compoundConfigurationsSchema.items.oneOf[1].properties.name.enum = launchNames;
|
|
273
|
+
const folderNames = ( this.contextService.getWorkspace().folders.map(f => f.name));
|
|
274
|
+
compoundConfigurationsSchema.items.oneOf[1].properties.folder.enum = folderNames;
|
|
275
|
+
jsonRegistry.registerSchema(launchSchemaId, launchSchema);
|
|
276
|
+
}
|
|
277
|
+
getLaunches() {
|
|
278
|
+
return this.launches;
|
|
279
|
+
}
|
|
280
|
+
getLaunch(workspaceUri) {
|
|
281
|
+
if (!URI.isUri(workspaceUri)) {
|
|
282
|
+
return undefined;
|
|
283
|
+
}
|
|
284
|
+
return this.launches.find(l => l.workspace && this.uriIdentityService.extUri.isEqual(l.workspace.uri, workspaceUri));
|
|
285
|
+
}
|
|
286
|
+
get selectedConfiguration() {
|
|
287
|
+
return {
|
|
288
|
+
launch: this.selectedLaunch,
|
|
289
|
+
name: this.selectedName,
|
|
290
|
+
getConfig: this.getSelectedConfig,
|
|
291
|
+
type: this.selectedType
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
get onDidSelectConfiguration() {
|
|
295
|
+
return this._onDidSelectConfigurationName.event;
|
|
296
|
+
}
|
|
297
|
+
getWorkspaceLaunch() {
|
|
298
|
+
if (this.contextService.getWorkbenchState() === 3 ) {
|
|
299
|
+
return this.launches[this.launches.length - 1];
|
|
300
|
+
}
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
303
|
+
async selectConfiguration(launch, name, config, dynamicConfig) {
|
|
304
|
+
if (typeof launch === 'undefined') {
|
|
305
|
+
const rootUri = this.historyService.getLastActiveWorkspaceRoot();
|
|
306
|
+
launch = this.getLaunch(rootUri);
|
|
307
|
+
if (!launch || launch.getConfigurationNames().length === 0) {
|
|
308
|
+
launch = this.launches.find(l => !!(l && l.getConfigurationNames().length)) || launch || this.launches[0];
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const previousLaunch = this.selectedLaunch;
|
|
312
|
+
const previousName = this.selectedName;
|
|
313
|
+
const previousSelectedDynamic = this.selectedDynamic;
|
|
314
|
+
this.selectedLaunch = launch;
|
|
315
|
+
if (this.selectedLaunch) {
|
|
316
|
+
this.storageService.store(DEBUG_SELECTED_ROOT, ( this.selectedLaunch.uri.toString()), 1 , 1 );
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
this.storageService.remove(DEBUG_SELECTED_ROOT, 1 );
|
|
320
|
+
}
|
|
321
|
+
const names = launch ? launch.getConfigurationNames() : [];
|
|
322
|
+
this.getSelectedConfig = () => {
|
|
323
|
+
const selected = this.selectedName ? launch?.getConfiguration(this.selectedName) : undefined;
|
|
324
|
+
return Promise.resolve(selected || config);
|
|
325
|
+
};
|
|
326
|
+
let type = config?.type;
|
|
327
|
+
if (name && names.indexOf(name) >= 0) {
|
|
328
|
+
this.setSelectedLaunchName(name);
|
|
329
|
+
}
|
|
330
|
+
else if (dynamicConfig && dynamicConfig.type) {
|
|
331
|
+
type = dynamicConfig.type;
|
|
332
|
+
if (!config) {
|
|
333
|
+
const providers = (await this.getDynamicProviders()).filter(p => p.type === type);
|
|
334
|
+
this.getSelectedConfig = async () => {
|
|
335
|
+
const activatedProviders = await Promise.all(( providers.map(p => p.getProvider())));
|
|
336
|
+
const provider = activatedProviders.length > 0 ? activatedProviders[0] : undefined;
|
|
337
|
+
if (provider && launch && launch.workspace) {
|
|
338
|
+
const token = ( new CancellationTokenSource());
|
|
339
|
+
const dynamicConfigs = await provider.provideDebugConfigurations(launch.workspace.uri, token.token);
|
|
340
|
+
const dynamicConfig = dynamicConfigs.find(c => c.name === name);
|
|
341
|
+
if (dynamicConfig) {
|
|
342
|
+
return dynamicConfig;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return undefined;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
this.setSelectedLaunchName(name);
|
|
349
|
+
let recentDynamicProviders = this.getRecentDynamicConfigurations();
|
|
350
|
+
if (name && dynamicConfig.type) {
|
|
351
|
+
recentDynamicProviders.unshift({ name, type: dynamicConfig.type });
|
|
352
|
+
recentDynamicProviders = distinct(recentDynamicProviders, t => `${t.name} : ${t.type}`);
|
|
353
|
+
this.storageService.store(DEBUG_RECENT_DYNAMIC_CONFIGURATIONS, JSON.stringify(recentDynamicProviders), 1 , 1 );
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
else if (!this.selectedName || names.indexOf(this.selectedName) === -1) {
|
|
357
|
+
const nameToSet = names.length ? names[0] : undefined;
|
|
358
|
+
this.setSelectedLaunchName(nameToSet);
|
|
359
|
+
}
|
|
360
|
+
if (!config && launch && this.selectedName) {
|
|
361
|
+
config = launch.getConfiguration(this.selectedName);
|
|
362
|
+
type = config?.type;
|
|
363
|
+
}
|
|
364
|
+
this.selectedType = dynamicConfig?.type || config?.type;
|
|
365
|
+
this.selectedDynamic = !!dynamicConfig;
|
|
366
|
+
this.storageService.store(DEBUG_SELECTED_TYPE, dynamicConfig ? this.selectedType : undefined, 1 , 1 );
|
|
367
|
+
if (type) {
|
|
368
|
+
this.debugConfigurationTypeContext.set(type);
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
this.debugConfigurationTypeContext.reset();
|
|
372
|
+
}
|
|
373
|
+
if (this.selectedLaunch !== previousLaunch || this.selectedName !== previousName || previousSelectedDynamic !== this.selectedDynamic) {
|
|
374
|
+
this._onDidSelectConfigurationName.fire();
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
setSelectedLaunchName(selectedName) {
|
|
378
|
+
this.selectedName = selectedName;
|
|
379
|
+
if (this.selectedName) {
|
|
380
|
+
this.storageService.store(DEBUG_SELECTED_CONFIG_NAME_KEY, this.selectedName, 1 , 1 );
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
this.storageService.remove(DEBUG_SELECTED_CONFIG_NAME_KEY, 1 );
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
dispose() {
|
|
387
|
+
this.toDispose = dispose(this.toDispose);
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
ConfigurationManager = ( __decorate([
|
|
391
|
+
( __param(1, IWorkspaceContextService)),
|
|
392
|
+
( __param(2, IConfigurationService)),
|
|
393
|
+
( __param(3, IQuickInputService)),
|
|
394
|
+
( __param(4, IInstantiationService)),
|
|
395
|
+
( __param(5, IStorageService)),
|
|
396
|
+
( __param(6, IExtensionService)),
|
|
397
|
+
( __param(7, IHistoryService)),
|
|
398
|
+
( __param(8, IUriIdentityService)),
|
|
399
|
+
( __param(9, IContextKeyService))
|
|
400
|
+
], ConfigurationManager));
|
|
401
|
+
class AbstractLaunch {
|
|
402
|
+
constructor(configurationManager, adapterManager) {
|
|
403
|
+
this.configurationManager = configurationManager;
|
|
404
|
+
this.adapterManager = adapterManager;
|
|
405
|
+
}
|
|
406
|
+
getCompound(name) {
|
|
407
|
+
const config = this.getConfig();
|
|
408
|
+
if (!config || !config.compounds) {
|
|
409
|
+
return undefined;
|
|
410
|
+
}
|
|
411
|
+
return config.compounds.find(compound => compound.name === name);
|
|
412
|
+
}
|
|
413
|
+
getConfigurationNames(ignoreCompoundsAndPresentation = false) {
|
|
414
|
+
const config = this.getConfig();
|
|
415
|
+
if (!config || (!Array.isArray(config.configurations) && !Array.isArray(config.compounds))) {
|
|
416
|
+
return [];
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
const configurations = [];
|
|
420
|
+
if (config.configurations) {
|
|
421
|
+
configurations.push(...config.configurations.filter(cfg => cfg && typeof cfg.name === 'string'));
|
|
422
|
+
}
|
|
423
|
+
if (ignoreCompoundsAndPresentation) {
|
|
424
|
+
return ( configurations.map(c => c.name));
|
|
425
|
+
}
|
|
426
|
+
if (config.compounds) {
|
|
427
|
+
configurations.push(...config.compounds.filter(compound => typeof compound.name === 'string' && compound.configurations && compound.configurations.length));
|
|
428
|
+
}
|
|
429
|
+
return ( getVisibleAndSorted(configurations).map(c => c.name));
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
getConfiguration(name) {
|
|
433
|
+
const config = objects.deepClone(this.getConfig());
|
|
434
|
+
if (!config || !config.configurations) {
|
|
435
|
+
return undefined;
|
|
436
|
+
}
|
|
437
|
+
const configuration = config.configurations.find(config => config && config.name === name);
|
|
438
|
+
if (configuration) {
|
|
439
|
+
if (this instanceof UserLaunch) {
|
|
440
|
+
configuration.__configurationTarget = 2 ;
|
|
441
|
+
}
|
|
442
|
+
else if (this instanceof WorkspaceLaunch) {
|
|
443
|
+
configuration.__configurationTarget = 5 ;
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
configuration.__configurationTarget = 6 ;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return configuration;
|
|
450
|
+
}
|
|
451
|
+
async getInitialConfigurationContent(folderUri, type, useInitialConfigs, token) {
|
|
452
|
+
let content = '';
|
|
453
|
+
const adapter = type ? this.adapterManager.getEnabledDebugger(type) : await this.adapterManager.guessDebugger(true);
|
|
454
|
+
if (adapter) {
|
|
455
|
+
const initialConfigs = useInitialConfigs ?
|
|
456
|
+
await this.configurationManager.provideDebugConfigurations(folderUri, adapter.type, token || CancellationToken.None) :
|
|
457
|
+
[];
|
|
458
|
+
content = await adapter.getInitialConfigurationContent(initialConfigs);
|
|
459
|
+
}
|
|
460
|
+
return content;
|
|
461
|
+
}
|
|
462
|
+
get hidden() {
|
|
463
|
+
return false;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
let Launch = class Launch extends AbstractLaunch {
|
|
467
|
+
constructor(configurationManager, adapterManager, workspace, fileService, textFileService, editorService, configurationService) {
|
|
468
|
+
super(configurationManager, adapterManager);
|
|
469
|
+
this.workspace = workspace;
|
|
470
|
+
this.fileService = fileService;
|
|
471
|
+
this.textFileService = textFileService;
|
|
472
|
+
this.editorService = editorService;
|
|
473
|
+
this.configurationService = configurationService;
|
|
474
|
+
}
|
|
475
|
+
get uri() {
|
|
476
|
+
return resources.joinPath(this.workspace.uri, '/.vscode/launch.json');
|
|
477
|
+
}
|
|
478
|
+
get name() {
|
|
479
|
+
return this.workspace.name;
|
|
480
|
+
}
|
|
481
|
+
getConfig() {
|
|
482
|
+
return this.configurationService.inspect('launch', { resource: this.workspace.uri }).workspaceFolderValue;
|
|
483
|
+
}
|
|
484
|
+
async openConfigFile({ preserveFocus, type, suppressInitialConfigs }, token) {
|
|
485
|
+
const resource = this.uri;
|
|
486
|
+
let created = false;
|
|
487
|
+
let content = '';
|
|
488
|
+
try {
|
|
489
|
+
const fileContent = await this.fileService.readFile(resource);
|
|
490
|
+
content = ( fileContent.value.toString());
|
|
491
|
+
}
|
|
492
|
+
catch {
|
|
493
|
+
content = await this.getInitialConfigurationContent(this.workspace.uri, type, !suppressInitialConfigs, token);
|
|
494
|
+
if (!content) {
|
|
495
|
+
return { editor: null, created: false };
|
|
496
|
+
}
|
|
497
|
+
created = true;
|
|
498
|
+
try {
|
|
499
|
+
await this.textFileService.write(resource, content);
|
|
500
|
+
}
|
|
501
|
+
catch (error) {
|
|
502
|
+
throw new Error(nls.localize('DebugConfig.failed', "Unable to create 'launch.json' file inside the '.vscode' folder ({0}).", error.message));
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
const index = content.indexOf(`"${this.configurationManager.selectedConfiguration.name}"`);
|
|
506
|
+
let startLineNumber = 1;
|
|
507
|
+
for (let i = 0; i < index; i++) {
|
|
508
|
+
if (content.charAt(i) === '\n') {
|
|
509
|
+
startLineNumber++;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
const selection = startLineNumber > 1 ? { startLineNumber, startColumn: 4 } : undefined;
|
|
513
|
+
const editor = await this.editorService.openEditor({
|
|
514
|
+
resource,
|
|
515
|
+
options: {
|
|
516
|
+
selection,
|
|
517
|
+
preserveFocus,
|
|
518
|
+
pinned: created,
|
|
519
|
+
revealIfVisible: true
|
|
520
|
+
},
|
|
521
|
+
}, ACTIVE_GROUP);
|
|
522
|
+
return ({
|
|
523
|
+
editor: editor ?? null,
|
|
524
|
+
created
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
async writeConfiguration(configuration) {
|
|
528
|
+
const fullConfig = objects.deepClone(this.getConfig());
|
|
529
|
+
if (!fullConfig.configurations) {
|
|
530
|
+
fullConfig.configurations = [];
|
|
531
|
+
}
|
|
532
|
+
fullConfig.configurations.push(configuration);
|
|
533
|
+
await this.configurationService.updateValue('launch', fullConfig, { resource: this.workspace.uri }, 6 );
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
Launch = ( __decorate([
|
|
537
|
+
( __param(3, IFileService)),
|
|
538
|
+
( __param(4, ITextFileService)),
|
|
539
|
+
( __param(5, IEditorService)),
|
|
540
|
+
( __param(6, IConfigurationService))
|
|
541
|
+
], Launch));
|
|
542
|
+
let WorkspaceLaunch = class WorkspaceLaunch extends AbstractLaunch {
|
|
543
|
+
constructor(configurationManager, adapterManager, editorService, configurationService, contextService) {
|
|
544
|
+
super(configurationManager, adapterManager);
|
|
545
|
+
this.editorService = editorService;
|
|
546
|
+
this.configurationService = configurationService;
|
|
547
|
+
this.contextService = contextService;
|
|
548
|
+
}
|
|
549
|
+
get workspace() {
|
|
550
|
+
return undefined;
|
|
551
|
+
}
|
|
552
|
+
get uri() {
|
|
553
|
+
return this.contextService.getWorkspace().configuration;
|
|
554
|
+
}
|
|
555
|
+
get name() {
|
|
556
|
+
return ( nls.localize('workspace', "workspace"));
|
|
557
|
+
}
|
|
558
|
+
getConfig() {
|
|
559
|
+
return this.configurationService.inspect('launch').workspaceValue;
|
|
560
|
+
}
|
|
561
|
+
async openConfigFile({ preserveFocus, type, useInitialConfigs }, token) {
|
|
562
|
+
const launchExistInFile = !!this.getConfig();
|
|
563
|
+
if (!launchExistInFile) {
|
|
564
|
+
const content = await this.getInitialConfigurationContent(undefined, type, useInitialConfigs, token);
|
|
565
|
+
if (content) {
|
|
566
|
+
await this.configurationService.updateValue('launch', json.parse(content), 5 );
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
return { editor: null, created: false };
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
const editor = await this.editorService.openEditor({
|
|
573
|
+
resource: this.contextService.getWorkspace().configuration,
|
|
574
|
+
options: { preserveFocus }
|
|
575
|
+
}, ACTIVE_GROUP);
|
|
576
|
+
return ({
|
|
577
|
+
editor: editor ?? null,
|
|
578
|
+
created: false
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
WorkspaceLaunch = ( __decorate([
|
|
583
|
+
( __param(2, IEditorService)),
|
|
584
|
+
( __param(3, IConfigurationService)),
|
|
585
|
+
( __param(4, IWorkspaceContextService))
|
|
586
|
+
], WorkspaceLaunch));
|
|
587
|
+
let UserLaunch = class UserLaunch extends AbstractLaunch {
|
|
588
|
+
constructor(configurationManager, adapterManager, configurationService, preferencesService) {
|
|
589
|
+
super(configurationManager, adapterManager);
|
|
590
|
+
this.configurationService = configurationService;
|
|
591
|
+
this.preferencesService = preferencesService;
|
|
592
|
+
}
|
|
593
|
+
get workspace() {
|
|
594
|
+
return undefined;
|
|
595
|
+
}
|
|
596
|
+
get uri() {
|
|
597
|
+
return this.preferencesService.userSettingsResource;
|
|
598
|
+
}
|
|
599
|
+
get name() {
|
|
600
|
+
return ( nls.localize('user settings', "user settings"));
|
|
601
|
+
}
|
|
602
|
+
get hidden() {
|
|
603
|
+
return true;
|
|
604
|
+
}
|
|
605
|
+
getConfig() {
|
|
606
|
+
return this.configurationService.inspect('launch').userValue;
|
|
607
|
+
}
|
|
608
|
+
async openConfigFile({ preserveFocus, type, useInitialContent }) {
|
|
609
|
+
const editor = await this.preferencesService.openUserSettings({ jsonEditor: true, preserveFocus, revealSetting: { key: 'launch' } });
|
|
610
|
+
return ({
|
|
611
|
+
editor: editor ?? null,
|
|
612
|
+
created: false
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
UserLaunch = ( __decorate([
|
|
617
|
+
( __param(2, IConfigurationService)),
|
|
618
|
+
( __param(3, IPreferencesService))
|
|
619
|
+
], UserLaunch));
|
|
620
|
+
|
|
621
|
+
export { ConfigurationManager };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { matchesFuzzy } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
3
|
+
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
4
|
+
import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
5
|
+
import { PickerQuickAccessProvider } from 'monaco-editor/esm/vs/platform/quickinput/browser/pickerQuickAccess.js';
|
|
6
|
+
import { IViewsService } from 'vscode/vscode/vs/workbench/common/views';
|
|
7
|
+
import { DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, SELECT_AND_START_ID } from './debugCommands.js';
|
|
8
|
+
import { REPL_VIEW_ID, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
9
|
+
|
|
10
|
+
let DebugConsoleQuickAccess = class DebugConsoleQuickAccess extends PickerQuickAccessProvider {
|
|
11
|
+
constructor(_debugService, _viewsService, _commandService) {
|
|
12
|
+
super(DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, { canAcceptInBackground: true });
|
|
13
|
+
this._debugService = _debugService;
|
|
14
|
+
this._viewsService = _viewsService;
|
|
15
|
+
this._commandService = _commandService;
|
|
16
|
+
}
|
|
17
|
+
_getPicks(filter, disposables, token) {
|
|
18
|
+
const debugConsolePicks = [];
|
|
19
|
+
this._debugService.getModel().getSessions(true).filter(s => s.hasSeparateRepl()).forEach((session, index) => {
|
|
20
|
+
const pick = this._createPick(session, index, filter);
|
|
21
|
+
if (pick) {
|
|
22
|
+
debugConsolePicks.push(pick);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
if (debugConsolePicks.length > 0) {
|
|
26
|
+
debugConsolePicks.push({ type: 'separator' });
|
|
27
|
+
}
|
|
28
|
+
const createTerminalLabel = ( localize("workbench.action.debug.startDebug", "Start a New Debug Session"));
|
|
29
|
+
debugConsolePicks.push({
|
|
30
|
+
label: `$(plus) ${createTerminalLabel}`,
|
|
31
|
+
ariaLabel: createTerminalLabel,
|
|
32
|
+
accept: () => this._commandService.executeCommand(SELECT_AND_START_ID)
|
|
33
|
+
});
|
|
34
|
+
return debugConsolePicks;
|
|
35
|
+
}
|
|
36
|
+
_createPick(session, sessionIndex, filter) {
|
|
37
|
+
const label = session.name;
|
|
38
|
+
const highlights = matchesFuzzy(filter, label, true);
|
|
39
|
+
if (highlights) {
|
|
40
|
+
return {
|
|
41
|
+
label,
|
|
42
|
+
highlights: { label: highlights },
|
|
43
|
+
accept: (keyMod, event) => {
|
|
44
|
+
this._debugService.focusStackFrame(undefined, undefined, session, { explicit: true });
|
|
45
|
+
if (!this._viewsService.isViewVisible(REPL_VIEW_ID)) {
|
|
46
|
+
this._viewsService.openView(REPL_VIEW_ID, true);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
DebugConsoleQuickAccess = ( __decorate([
|
|
55
|
+
( __param(0, IDebugService)),
|
|
56
|
+
( __param(1, IViewsService)),
|
|
57
|
+
( __param(2, ICommandService))
|
|
58
|
+
], DebugConsoleQuickAccess));
|
|
59
|
+
|
|
60
|
+
export { DebugConsoleQuickAccess };
|