@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.
Files changed (73) hide show
  1. package/debug.d.ts +5 -0
  2. package/debug.js +24 -0
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
  4. package/external/tslib/tslib.es6.js +11 -0
  5. package/index.d.ts +1 -1
  6. package/index.js +1 -1
  7. package/override/vs/platform/dialogs/common/dialogs.js +8 -0
  8. package/package.json +2 -2
  9. package/vscode/src/vs/editor/common/services/languageFeaturesService.js +44 -0
  10. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +200 -0
  11. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +785 -0
  12. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +399 -0
  13. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1298 -0
  14. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
  15. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +960 -0
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +497 -0
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +347 -0
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +299 -0
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +400 -0
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +827 -0
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +621 -0
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +60 -0
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +527 -0
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +681 -0
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +356 -0
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +206 -0
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +82 -0
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +143 -0
  29. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +1174 -0
  30. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +1144 -0
  31. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +106 -0
  32. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +68 -0
  33. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +275 -0
  34. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +314 -0
  35. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +168 -0
  36. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +663 -0
  37. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +105 -0
  38. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +231 -0
  39. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +631 -0
  40. package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +6 -0
  41. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +6 -0
  42. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +6 -0
  43. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +6 -0
  44. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +6 -0
  45. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +6 -0
  46. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +6 -0
  47. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +6 -0
  48. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +695 -0
  49. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +953 -0
  50. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +48 -0
  51. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +336 -0
  52. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +98 -0
  53. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +575 -0
  54. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +415 -0
  55. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +102 -0
  56. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +21 -0
  57. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +17 -0
  58. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +100 -0
  59. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +59 -0
  60. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1482 -0
  61. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +346 -0
  62. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +123 -0
  63. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +175 -0
  64. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +36 -0
  65. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +117 -0
  66. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +260 -0
  67. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +27 -0
  68. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +83 -0
  69. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +283 -0
  70. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +305 -0
  71. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +28 -0
  72. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +176 -0
  73. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +12 -0
@@ -0,0 +1,400 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
3
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
5
+ import * as strings from 'monaco-editor/esm/vs/base/common/strings.js';
6
+ import { isCodeEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
7
+ import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
8
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
9
+ import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
10
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
11
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
12
+ import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
13
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
14
+ import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
15
+ import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
16
+ import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
17
+ import { Breakpoints } from '../common/breakpoints.js';
18
+ import { CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_DEBUG_EXTENSION_AVAILABLE, INTERNAL_CONSOLE_OPTIONS_SCHEMA } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
19
+ import { Debugger } from '../common/debugger.js';
20
+ import { debuggersExtPoint, breakpointsExtPoint, launchSchema, presentationSchema } from '../common/debugSchemas.js';
21
+ import { TaskDefinitionRegistry } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry';
22
+ import { launchSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
23
+ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
24
+ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
25
+ import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
26
+ import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
27
+
28
+ const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
29
+ let AdapterManager = class AdapterManager extends Disposable {
30
+ constructor(delegate, editorService, configurationService, quickInputService, instantiationService, commandService, extensionService, contextKeyService, languageService, dialogService, lifecycleService) {
31
+ super();
32
+ this.editorService = editorService;
33
+ this.configurationService = configurationService;
34
+ this.quickInputService = quickInputService;
35
+ this.instantiationService = instantiationService;
36
+ this.commandService = commandService;
37
+ this.extensionService = extensionService;
38
+ this.contextKeyService = contextKeyService;
39
+ this.languageService = languageService;
40
+ this.dialogService = dialogService;
41
+ this.lifecycleService = lifecycleService;
42
+ this.debugAdapterFactories = ( new Map());
43
+ this._onDidRegisterDebugger = ( new Emitter());
44
+ this._onDidDebuggersExtPointRead = ( new Emitter());
45
+ this.breakpointContributions = [];
46
+ this.debuggerWhenKeys = ( new Set());
47
+ this.usedDebugTypes = ( new Set());
48
+ this.adapterDescriptorFactories = [];
49
+ this.debuggers = [];
50
+ this.registerListeners();
51
+ this.contextKeyService.bufferChangeEvents(() => {
52
+ this.debuggersAvailable = CONTEXT_DEBUGGERS_AVAILABLE.bindTo(contextKeyService);
53
+ this.debugExtensionsAvailable = CONTEXT_DEBUG_EXTENSION_AVAILABLE.bindTo(contextKeyService);
54
+ });
55
+ this._register(this.contextKeyService.onDidChangeContext(e => {
56
+ if (e.affectsSome(this.debuggerWhenKeys)) {
57
+ this.debuggersAvailable.set(this.hasEnabledDebuggers());
58
+ this.updateDebugAdapterSchema();
59
+ }
60
+ }));
61
+ this._register(this.onDidDebuggersExtPointRead(() => {
62
+ this.debugExtensionsAvailable.set(this.debuggers.length > 0);
63
+ }));
64
+ this.lifecycleService.when(4 )
65
+ .then(() => this.debugExtensionsAvailable.set(this.debuggers.length > 0));
66
+ this._register(delegate.onDidNewSession(s => {
67
+ this.usedDebugTypes.add(s.configuration.type);
68
+ }));
69
+ }
70
+ registerListeners() {
71
+ debuggersExtPoint.setHandler((extensions, delta) => {
72
+ delta.added.forEach(added => {
73
+ added.value.forEach(rawAdapter => {
74
+ if (!rawAdapter.type || (typeof rawAdapter.type !== 'string')) {
75
+ added.collector.error(( nls.localize(
76
+ 'debugNoType',
77
+ "Debugger 'type' can not be omitted and must be of type 'string'."
78
+ )));
79
+ }
80
+ if (rawAdapter.type !== '*') {
81
+ const existing = this.getDebugger(rawAdapter.type);
82
+ if (existing) {
83
+ existing.merge(rawAdapter, added.description);
84
+ }
85
+ else {
86
+ const dbg = this.instantiationService.createInstance(Debugger, this, rawAdapter, added.description);
87
+ dbg.when?.keys().forEach(key => this.debuggerWhenKeys.add(key));
88
+ this.debuggers.push(dbg);
89
+ }
90
+ }
91
+ });
92
+ });
93
+ extensions.forEach(extension => {
94
+ extension.value.forEach(rawAdapter => {
95
+ if (rawAdapter.type === '*') {
96
+ this.debuggers.forEach(dbg => dbg.merge(rawAdapter, extension.description));
97
+ }
98
+ });
99
+ });
100
+ delta.removed.forEach(removed => {
101
+ const removedTypes = ( removed.value.map(rawAdapter => rawAdapter.type));
102
+ this.debuggers = this.debuggers.filter(d => removedTypes.indexOf(d.type) === -1);
103
+ });
104
+ this.updateDebugAdapterSchema();
105
+ this._onDidDebuggersExtPointRead.fire();
106
+ });
107
+ breakpointsExtPoint.setHandler(extensions => {
108
+ this.breakpointContributions = extensions.flatMap(ext => ( ext.value.map(
109
+ breakpoint => this.instantiationService.createInstance(Breakpoints, breakpoint)
110
+ )));
111
+ });
112
+ }
113
+ updateDebugAdapterSchema() {
114
+ const items = launchSchema.properties['configurations'].items;
115
+ const taskSchema = TaskDefinitionRegistry.getJsonSchema();
116
+ const definitions = {
117
+ 'common': {
118
+ properties: {
119
+ 'name': {
120
+ type: 'string',
121
+ description: ( nls.localize(
122
+ 'debugName',
123
+ "Name of configuration; appears in the launch configuration dropdown menu."
124
+ )),
125
+ default: 'Launch'
126
+ },
127
+ 'debugServer': {
128
+ type: 'number',
129
+ description: ( nls.localize(
130
+ 'debugServer',
131
+ "For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode"
132
+ )),
133
+ default: 4711
134
+ },
135
+ 'preLaunchTask': {
136
+ anyOf: [taskSchema, {
137
+ type: ['string']
138
+ }],
139
+ default: '',
140
+ defaultSnippets: [{ body: { task: '', type: '' } }],
141
+ description: ( nls.localize('debugPrelaunchTask', "Task to run before debug session starts."))
142
+ },
143
+ 'postDebugTask': {
144
+ anyOf: [taskSchema, {
145
+ type: ['string'],
146
+ }],
147
+ default: '',
148
+ defaultSnippets: [{ body: { task: '', type: '' } }],
149
+ description: ( nls.localize('debugPostDebugTask', "Task to run after debug session ends."))
150
+ },
151
+ 'presentation': presentationSchema,
152
+ 'internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA,
153
+ 'suppressMultipleSessionWarning': {
154
+ type: 'boolean',
155
+ description: ( nls.localize(
156
+ 'suppressMultipleSessionWarning',
157
+ "Disable the warning when trying to start the same debug configuration more than once."
158
+ )),
159
+ default: true
160
+ }
161
+ }
162
+ }
163
+ };
164
+ launchSchema.definitions = definitions;
165
+ items.oneOf = [];
166
+ items.defaultSnippets = [];
167
+ this.debuggers.forEach(adapter => {
168
+ const schemaAttributes = adapter.getSchemaAttributes(definitions);
169
+ if (schemaAttributes && items.oneOf) {
170
+ items.oneOf.push(...schemaAttributes);
171
+ }
172
+ const configurationSnippets = adapter.configurationSnippets;
173
+ if (configurationSnippets && items.defaultSnippets) {
174
+ items.defaultSnippets.push(...configurationSnippets);
175
+ }
176
+ });
177
+ jsonRegistry.registerSchema(launchSchemaId, launchSchema);
178
+ }
179
+ registerDebugAdapterFactory(debugTypes, debugAdapterLauncher) {
180
+ debugTypes.forEach(debugType => this.debugAdapterFactories.set(debugType, debugAdapterLauncher));
181
+ this.debuggersAvailable.set(this.hasEnabledDebuggers());
182
+ this._onDidRegisterDebugger.fire();
183
+ return {
184
+ dispose: () => {
185
+ debugTypes.forEach(debugType => this.debugAdapterFactories.delete(debugType));
186
+ }
187
+ };
188
+ }
189
+ hasEnabledDebuggers() {
190
+ for (const [type] of this.debugAdapterFactories) {
191
+ const dbg = this.getDebugger(type);
192
+ if (dbg && dbg.enabled) {
193
+ return true;
194
+ }
195
+ }
196
+ return false;
197
+ }
198
+ createDebugAdapter(session) {
199
+ const factory = this.debugAdapterFactories.get(session.configuration.type);
200
+ if (factory) {
201
+ return factory.createDebugAdapter(session);
202
+ }
203
+ return undefined;
204
+ }
205
+ substituteVariables(debugType, folder, config) {
206
+ const factory = this.debugAdapterFactories.get(debugType);
207
+ if (factory) {
208
+ return factory.substituteVariables(folder, config);
209
+ }
210
+ return Promise.resolve(config);
211
+ }
212
+ runInTerminal(debugType, args, sessionId) {
213
+ const factory = this.debugAdapterFactories.get(debugType);
214
+ if (factory) {
215
+ return factory.runInTerminal(args, sessionId);
216
+ }
217
+ return Promise.resolve(void 0);
218
+ }
219
+ registerDebugAdapterDescriptorFactory(debugAdapterProvider) {
220
+ this.adapterDescriptorFactories.push(debugAdapterProvider);
221
+ return {
222
+ dispose: () => {
223
+ this.unregisterDebugAdapterDescriptorFactory(debugAdapterProvider);
224
+ }
225
+ };
226
+ }
227
+ unregisterDebugAdapterDescriptorFactory(debugAdapterProvider) {
228
+ const ix = this.adapterDescriptorFactories.indexOf(debugAdapterProvider);
229
+ if (ix >= 0) {
230
+ this.adapterDescriptorFactories.splice(ix, 1);
231
+ }
232
+ }
233
+ getDebugAdapterDescriptor(session) {
234
+ const config = session.configuration;
235
+ const providers = this.adapterDescriptorFactories.filter(p => p.type === config.type && p.createDebugAdapterDescriptor);
236
+ if (providers.length === 1) {
237
+ return providers[0].createDebugAdapterDescriptor(session);
238
+ }
239
+ return Promise.resolve(undefined);
240
+ }
241
+ getDebuggerLabel(type) {
242
+ const dbgr = this.getDebugger(type);
243
+ if (dbgr) {
244
+ return dbgr.label;
245
+ }
246
+ return undefined;
247
+ }
248
+ get onDidRegisterDebugger() {
249
+ return this._onDidRegisterDebugger.event;
250
+ }
251
+ get onDidDebuggersExtPointRead() {
252
+ return this._onDidDebuggersExtPointRead.event;
253
+ }
254
+ canSetBreakpointsIn(model) {
255
+ const languageId = model.getLanguageId();
256
+ if (!languageId || languageId === 'jsonc' || languageId === 'log') {
257
+ return false;
258
+ }
259
+ if (this.configurationService.getValue('debug').allowBreakpointsEverywhere) {
260
+ return true;
261
+ }
262
+ return ( this.breakpointContributions.some(breakpoints => breakpoints.language === languageId && breakpoints.enabled));
263
+ }
264
+ getDebugger(type) {
265
+ return this.debuggers.find(dbg => strings.equalsIgnoreCase(dbg.type, type));
266
+ }
267
+ getEnabledDebugger(type) {
268
+ const adapter = this.getDebugger(type);
269
+ return adapter && adapter.enabled ? adapter : undefined;
270
+ }
271
+ someDebuggerInterestedInLanguage(languageId) {
272
+ return !!this.debuggers
273
+ .filter(d => d.enabled)
274
+ .find(a => a.interestedInLanguage(languageId));
275
+ }
276
+ async guessDebugger(gettingConfigurations) {
277
+ const activeTextEditorControl = this.editorService.activeTextEditorControl;
278
+ let candidates = [];
279
+ let languageLabel = null;
280
+ let model = null;
281
+ if (isCodeEditor(activeTextEditorControl)) {
282
+ model = activeTextEditorControl.getModel();
283
+ const language = model ? model.getLanguageId() : undefined;
284
+ if (language) {
285
+ languageLabel = this.languageService.getLanguageName(language);
286
+ }
287
+ const adapters = this.debuggers
288
+ .filter(a => a.enabled)
289
+ .filter(a => language && a.interestedInLanguage(language));
290
+ if (adapters.length === 1) {
291
+ return adapters[0];
292
+ }
293
+ if (adapters.length > 1) {
294
+ candidates = adapters;
295
+ }
296
+ }
297
+ if ((!languageLabel || gettingConfigurations || (model && this.canSetBreakpointsIn(model))) && candidates.length === 0) {
298
+ await this.activateDebuggers('onDebugInitialConfigurations');
299
+ candidates = this.debuggers
300
+ .filter(a => a.enabled)
301
+ .filter(dbg => dbg.hasInitialConfiguration() || dbg.hasConfigurationProvider());
302
+ }
303
+ if (candidates.length === 0 && languageLabel) {
304
+ if (languageLabel.indexOf(' ') >= 0) {
305
+ languageLabel = `'${languageLabel}'`;
306
+ }
307
+ const { confirmed } = await this.dialogService.confirm({
308
+ type: Severity.Warning,
309
+ message: ( nls.localize(
310
+ 'CouldNotFindLanguage',
311
+ "You don't have an extension for debugging {0}. Should we find a {0} extension in the Marketplace?",
312
+ languageLabel
313
+ )),
314
+ primaryButton: ( nls.localize(
315
+ { key: 'findExtension', comment: ['&& denotes a mnemonic'] },
316
+ "&&Find {0} extension",
317
+ languageLabel
318
+ ))
319
+ });
320
+ if (confirmed) {
321
+ await this.commandService.executeCommand('debug.installAdditionalDebuggers', languageLabel);
322
+ }
323
+ return undefined;
324
+ }
325
+ this.initExtensionActivationsIfNeeded();
326
+ candidates.sort((first, second) => first.label.localeCompare(second.label));
327
+ const suggestedCandidates = [];
328
+ const otherCandidates = [];
329
+ candidates.forEach(d => {
330
+ const descriptor = d.getMainExtensionDescriptor();
331
+ if (descriptor.id && !!this.earlyActivatedExtensions?.has(descriptor.id)) {
332
+ suggestedCandidates.push(d);
333
+ }
334
+ else if (( this.usedDebugTypes.has(d.type))) {
335
+ suggestedCandidates.push(d);
336
+ }
337
+ else {
338
+ otherCandidates.push(d);
339
+ }
340
+ });
341
+ const picks = [];
342
+ if (suggestedCandidates.length > 0) {
343
+ picks.push({ type: 'separator', label: ( nls.localize('suggestedDebuggers', "Suggested")) }, ...( suggestedCandidates.map(c => ({ label: c.label, debugger: c }))));
344
+ }
345
+ if (otherCandidates.length > 0) {
346
+ if (picks.length > 0) {
347
+ picks.push({ type: 'separator', label: '' });
348
+ }
349
+ picks.push(...( otherCandidates.map(c => ({ label: c.label, debugger: c }))));
350
+ }
351
+ picks.push({ type: 'separator', label: '' }, { label: languageLabel ? ( nls.localize('installLanguage', "Install an extension for {0}...", languageLabel)) : ( nls.localize('installExt', "Install extension...")) });
352
+ const placeHolder = ( nls.localize('selectDebug', "Select debugger"));
353
+ return this.quickInputService.pick(picks, { activeItem: picks[0], placeHolder })
354
+ .then(picked => {
355
+ if (picked && picked.debugger) {
356
+ return picked.debugger;
357
+ }
358
+ if (picked) {
359
+ this.commandService.executeCommand('debug.installAdditionalDebuggers', languageLabel);
360
+ }
361
+ return undefined;
362
+ });
363
+ }
364
+ initExtensionActivationsIfNeeded() {
365
+ if (!this.earlyActivatedExtensions) {
366
+ this.earlyActivatedExtensions = ( new Set());
367
+ const status = this.extensionService.getExtensionsStatus();
368
+ for (const id in status) {
369
+ if (!!status[id].activationTimes) {
370
+ this.earlyActivatedExtensions.add(id);
371
+ }
372
+ }
373
+ }
374
+ }
375
+ async activateDebuggers(activationEvent, debugType) {
376
+ this.initExtensionActivationsIfNeeded();
377
+ const promises = [
378
+ this.extensionService.activateByEvent(activationEvent),
379
+ this.extensionService.activateByEvent('onDebug')
380
+ ];
381
+ if (debugType) {
382
+ promises.push(this.extensionService.activateByEvent(`${activationEvent}:${debugType}`));
383
+ }
384
+ await Promise.all(promises);
385
+ }
386
+ };
387
+ AdapterManager = ( __decorate([
388
+ ( __param(1, IEditorService)),
389
+ ( __param(2, IConfigurationService)),
390
+ ( __param(3, IQuickInputService)),
391
+ ( __param(4, IInstantiationService)),
392
+ ( __param(5, ICommandService)),
393
+ ( __param(6, IExtensionService)),
394
+ ( __param(7, IContextKeyService)),
395
+ ( __param(8, ILanguageService)),
396
+ ( __param(9, IDialogService)),
397
+ ( __param(10, ILifecycleService))
398
+ ], AdapterManager));
399
+
400
+ export { AdapterManager };