@codingame/monaco-vscode-debug-service-override 11.1.2 → 12.0.0
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/index.d.ts +2 -1
- package/index.js +27 -1
- package/package.json +42 -8
- package/service-override/tools/debugAssets.d.ts +1 -0
- package/service-override/tools/debugAssets.js +5 -0
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.d.ts +28 -0
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.d.ts +79 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +24 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +108 -132
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +208 -264
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +46 -40
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +72 -54
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.d.ts +91 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +151 -148
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +10 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +65 -107
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +108 -105
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +49 -37
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +11 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +4 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +24 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.d.ts +160 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +194 -169
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.d.ts +206 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +150 -173
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +14 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +76 -68
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +4 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +70 -94
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +59 -84
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +61 -60
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +19 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +7 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +55 -53
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +62 -61
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.d.ts +107 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +148 -155
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +39 -38
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +8 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +6 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.d.ts +131 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +42 -40
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +74 -76
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +16 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +74 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +63 -63
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +53 -66
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +3 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +16 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugContext.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContext.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +11 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +51 -50
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +26 -22
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +2 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +3 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +83 -84
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +5 -4
- package/debug.js +0 -26
- package/tools/debugAssets.js +0 -4
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IAction } from "vscode/vscode/vs/base/common/actions";
|
|
2
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
|
|
4
|
+
import { IDebugSession } from "vscode/vscode/vs/workbench/contrib/debug/common/debug";
|
|
5
|
+
import { IDebugService } from "vscode/vscode/vs/workbench/contrib/debug/common/debug.service";
|
|
6
|
+
import { IContextViewService } from "vscode/vscode/vs/platform/contextview/browser/contextView.service";
|
|
7
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
8
|
+
import { BaseActionViewItem, IBaseActionViewItemOptions, SelectActionViewItem } from "vscode/vscode/vs/base/browser/ui/actionbar/actionViewItems";
|
|
9
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
10
|
+
import { IHoverService } from "vscode/vscode/vs/platform/hover/browser/hover.service";
|
|
11
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
12
|
+
export declare class StartDebugActionViewItem extends BaseActionViewItem {
|
|
13
|
+
private context;
|
|
14
|
+
private readonly debugService;
|
|
15
|
+
private readonly configurationService;
|
|
16
|
+
private readonly commandService;
|
|
17
|
+
private readonly contextService;
|
|
18
|
+
private readonly keybindingService;
|
|
19
|
+
private readonly hoverService;
|
|
20
|
+
private readonly contextKeyService;
|
|
21
|
+
private static readonly SEPARATOR;
|
|
22
|
+
private container;
|
|
23
|
+
private start;
|
|
24
|
+
private selectBox;
|
|
25
|
+
private debugOptions;
|
|
26
|
+
private toDispose;
|
|
27
|
+
private selected;
|
|
28
|
+
private providers;
|
|
29
|
+
constructor(context: unknown, action: IAction, options: IBaseActionViewItemOptions, debugService: IDebugService, configurationService: IConfigurationService, commandService: ICommandService, contextService: IWorkspaceContextService, contextViewService: IContextViewService, keybindingService: IKeybindingService, hoverService: IHoverService, contextKeyService: IContextKeyService);
|
|
30
|
+
private registerListeners;
|
|
31
|
+
render(container: HTMLElement): void;
|
|
32
|
+
setActionContext(context: any): void;
|
|
33
|
+
isEnabled(): boolean;
|
|
34
|
+
focus(fromRight?: boolean): void;
|
|
35
|
+
blur(): void;
|
|
36
|
+
setFocusable(focusable: boolean): void;
|
|
37
|
+
dispose(): void;
|
|
38
|
+
private updateOptions;
|
|
39
|
+
private _setAriaLabel;
|
|
40
|
+
}
|
|
41
|
+
export declare class FocusSessionActionViewItem extends SelectActionViewItem<IDebugSession> {
|
|
42
|
+
protected readonly debugService: IDebugService;
|
|
43
|
+
private readonly configurationService;
|
|
44
|
+
constructor(action: IAction, session: IDebugSession | undefined, debugService: IDebugService, contextViewService: IContextViewService, configurationService: IConfigurationService);
|
|
45
|
+
protected getActionContext(_: string, index: number): IDebugSession;
|
|
46
|
+
private update;
|
|
47
|
+
private getSelectedSession;
|
|
48
|
+
protected getSessions(): ReadonlyArray<IDebugSession>;
|
|
49
|
+
protected mapFocusedSessionToSelected(focusedSession: IDebugSession): IDebugSession;
|
|
50
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
4
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
3
5
|
import { $ as $$1, append, addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
6
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
5
7
|
import { SelectBox } from 'vscode/vscode/vs/base/browser/ui/selectBox/selectBox';
|
|
6
8
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
9
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
10
|
+
import { State } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
8
11
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
9
12
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
10
13
|
import { asCssVariable } from 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
@@ -19,15 +22,18 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
|
19
22
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
20
23
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
21
24
|
import { IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
25
|
+
import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
22
26
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
23
27
|
import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
24
|
-
import { ADD_CONFIGURATION_ID } from '@codingame/monaco-vscode-
|
|
28
|
+
import { ADD_CONFIGURATION_ID } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/browser/debugCommands';
|
|
25
29
|
import { BaseActionViewItem, SelectActionViewItem } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
26
|
-
import { debugStart } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
30
|
+
import { debugStart } from '@codingame/monaco-vscode-fc42f049-7883-579d-bb0b-2aa1010a19a8-common/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
27
31
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
28
32
|
import { defaultSelectBoxStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
29
33
|
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
30
34
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
35
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
36
|
+
import { AccessibilityCommandId } from 'vscode/vscode/vs/workbench/contrib/accessibility/common/accessibilityCommands';
|
|
31
37
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
32
38
|
|
|
33
39
|
var StartDebugActionViewItem_1;
|
|
@@ -49,13 +55,13 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
49
55
|
this.selected = 0;
|
|
50
56
|
this.providers = [];
|
|
51
57
|
this.toDispose = [];
|
|
52
|
-
this.selectBox = (
|
|
58
|
+
this.selectBox = ( new SelectBox(
|
|
53
59
|
[],
|
|
54
60
|
-1,
|
|
55
61
|
contextViewService,
|
|
56
62
|
defaultSelectBoxStyles,
|
|
57
|
-
{ ariaLabel: ( localize(
|
|
58
|
-
))
|
|
63
|
+
{ ariaLabel: ( localize(5175, 'Debug Launch Configurations')) }
|
|
64
|
+
));
|
|
59
65
|
this.selectBox.setFocusable(false);
|
|
60
66
|
this.toDispose.push(this.selectBox);
|
|
61
67
|
this.registerListeners();
|
|
@@ -82,7 +88,7 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
82
88
|
this._setAriaLabel(title);
|
|
83
89
|
this.toDispose.push(addDisposableListener(this.start, EventType.CLICK, () => {
|
|
84
90
|
this.start.blur();
|
|
85
|
-
if (this.debugService.state !==
|
|
91
|
+
if (this.debugService.state !== State.Initializing) {
|
|
86
92
|
this.actionRunner.run(this.action, this.context);
|
|
87
93
|
}
|
|
88
94
|
}));
|
|
@@ -98,8 +104,8 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
98
104
|
this.start.classList.remove('active');
|
|
99
105
|
}));
|
|
100
106
|
this.toDispose.push(addDisposableListener(this.start, EventType.KEY_DOWN, (e) => {
|
|
101
|
-
const event = (
|
|
102
|
-
if (event.equals(
|
|
107
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
108
|
+
if (event.equals(KeyCode.RightArrow)) {
|
|
103
109
|
this.start.tabIndex = -1;
|
|
104
110
|
this.selectBox.focus();
|
|
105
111
|
event.stopPropagation();
|
|
@@ -118,8 +124,8 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
118
124
|
const selectBoxContainer = $('.configuration');
|
|
119
125
|
this.selectBox.render(append(container, selectBoxContainer));
|
|
120
126
|
this.toDispose.push(addDisposableListener(selectBoxContainer, EventType.KEY_DOWN, (e) => {
|
|
121
|
-
const event = (
|
|
122
|
-
if (event.equals(
|
|
127
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
128
|
+
if (event.equals(KeyCode.LeftArrow)) {
|
|
123
129
|
this.selectBox.setFocusable(false);
|
|
124
130
|
this.start.tabIndex = 0;
|
|
125
131
|
this.start.focus();
|
|
@@ -177,7 +183,7 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
177
183
|
this.selected = 0;
|
|
178
184
|
this.debugOptions = [];
|
|
179
185
|
const manager = this.debugService.getConfigurationManager();
|
|
180
|
-
const inWorkspace = this.contextService.getWorkbenchState() ===
|
|
186
|
+
const inWorkspace = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE;
|
|
181
187
|
let lastGroup;
|
|
182
188
|
const disabledIdxs = [];
|
|
183
189
|
manager.getAllConfigurations().forEach(({ launch, name, presentation }) => {
|
|
@@ -212,7 +218,7 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
212
218
|
});
|
|
213
219
|
});
|
|
214
220
|
if (this.debugOptions.length === 0) {
|
|
215
|
-
this.debugOptions.push({ label: ( localize(
|
|
221
|
+
this.debugOptions.push({ label: ( localize(5176, "No Configurations")), handler: async () => false });
|
|
216
222
|
}
|
|
217
223
|
this.debugOptions.push({ label: StartDebugActionViewItem_1.SEPARATOR, handler: () => Promise.resolve(false) });
|
|
218
224
|
disabledIdxs.push(this.debugOptions.length - 1);
|
|
@@ -230,31 +236,31 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
230
236
|
});
|
|
231
237
|
});
|
|
232
238
|
manager.getLaunches().filter(l => !l.hidden).forEach(l => {
|
|
233
|
-
const label = inWorkspace ? ( localize(
|
|
239
|
+
const label = inWorkspace ? ( localize(5177, "Add Config ({0})...", l.name)) : ( localize(5178, "Add Configuration..."));
|
|
234
240
|
this.debugOptions.push({
|
|
235
241
|
label, handler: async () => {
|
|
236
|
-
await this.commandService.executeCommand(ADD_CONFIGURATION_ID, (
|
|
242
|
+
await this.commandService.executeCommand(ADD_CONFIGURATION_ID, ( l.uri.toString()));
|
|
237
243
|
return false;
|
|
238
244
|
}
|
|
239
245
|
});
|
|
240
246
|
});
|
|
241
|
-
this.selectBox.setOptions((
|
|
247
|
+
this.selectBox.setOptions(( this.debugOptions.map(
|
|
242
248
|
(data, index) => ({ text: data.label, isDisabled: disabledIdxs.indexOf(index) !== -1 })
|
|
243
|
-
))
|
|
249
|
+
)), this.selected);
|
|
244
250
|
}
|
|
245
251
|
_setAriaLabel(title) {
|
|
246
252
|
let ariaLabel = title;
|
|
247
253
|
let keybinding;
|
|
248
|
-
const verbose = this.configurationService.getValue(
|
|
254
|
+
const verbose = this.configurationService.getValue(AccessibilityVerbositySettingId.Debug);
|
|
249
255
|
if (verbose) {
|
|
250
|
-
keybinding = this.keybindingService.lookupKeybinding(
|
|
256
|
+
keybinding = this.keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibilityHelp, this.contextKeyService)?.getLabel() ?? undefined;
|
|
251
257
|
}
|
|
252
258
|
if (keybinding) {
|
|
253
|
-
ariaLabel = ( localize(
|
|
259
|
+
ariaLabel = ( localize(5179, "{0}, use ({1}) for accessibility help", ariaLabel, keybinding));
|
|
254
260
|
}
|
|
255
261
|
else {
|
|
256
262
|
ariaLabel = ( localize(
|
|
257
|
-
|
|
263
|
+
5180,
|
|
258
264
|
"{0}, run the command Open Accessibility Help which is currently not triggerable via keybinding.",
|
|
259
265
|
ariaLabel
|
|
260
266
|
));
|
|
@@ -262,19 +268,19 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
262
268
|
this.start.ariaLabel = ariaLabel;
|
|
263
269
|
}
|
|
264
270
|
};
|
|
265
|
-
StartDebugActionViewItem = StartDebugActionViewItem_1 = (
|
|
266
|
-
(
|
|
267
|
-
(
|
|
268
|
-
(
|
|
269
|
-
(
|
|
270
|
-
(
|
|
271
|
-
(
|
|
272
|
-
(
|
|
273
|
-
(
|
|
274
|
-
], StartDebugActionViewItem))
|
|
271
|
+
StartDebugActionViewItem = StartDebugActionViewItem_1 = ( __decorate([
|
|
272
|
+
( __param(3, IDebugService)),
|
|
273
|
+
( __param(4, IConfigurationService)),
|
|
274
|
+
( __param(5, ICommandService)),
|
|
275
|
+
( __param(6, IWorkspaceContextService)),
|
|
276
|
+
( __param(7, IContextViewService)),
|
|
277
|
+
( __param(8, IKeybindingService)),
|
|
278
|
+
( __param(9, IHoverService)),
|
|
279
|
+
( __param(10, IContextKeyService))
|
|
280
|
+
], StartDebugActionViewItem));
|
|
275
281
|
let FocusSessionActionViewItem = class FocusSessionActionViewItem extends SelectActionViewItem {
|
|
276
282
|
constructor(action, session, debugService, contextViewService, configurationService) {
|
|
277
|
-
super(null, action, [], -1, contextViewService, defaultSelectBoxStyles, { ariaLabel: ( localize(
|
|
283
|
+
super(null, action, [], -1, contextViewService, defaultSelectBoxStyles, { ariaLabel: ( localize(5181, 'Debug Session')) });
|
|
278
284
|
this.debugService = debugService;
|
|
279
285
|
this.configurationService = configurationService;
|
|
280
286
|
this._register(this.debugService.getViewModel().onDidFocusSession(() => {
|
|
@@ -305,14 +311,14 @@ let FocusSessionActionViewItem = class FocusSessionActionViewItem extends Select
|
|
|
305
311
|
session = this.getSelectedSession();
|
|
306
312
|
}
|
|
307
313
|
const sessions = this.getSessions();
|
|
308
|
-
const names = (
|
|
314
|
+
const names = ( sessions.map(s => {
|
|
309
315
|
const label = s.getLabel();
|
|
310
316
|
if (s.parentSession) {
|
|
311
317
|
return `\u00A0\u00A0${label}`;
|
|
312
318
|
}
|
|
313
319
|
return label;
|
|
314
|
-
}))
|
|
315
|
-
this.setOptions((
|
|
320
|
+
}));
|
|
321
|
+
this.setOptions(( names.map((data) => ({ text: data }))), session ? sessions.indexOf(session) : undefined);
|
|
316
322
|
}
|
|
317
323
|
getSelectedSession() {
|
|
318
324
|
const session = this.debugService.getViewModel().focusedSession;
|
|
@@ -331,10 +337,10 @@ let FocusSessionActionViewItem = class FocusSessionActionViewItem extends Select
|
|
|
331
337
|
return focusedSession;
|
|
332
338
|
}
|
|
333
339
|
};
|
|
334
|
-
FocusSessionActionViewItem = (
|
|
335
|
-
(
|
|
336
|
-
(
|
|
337
|
-
(
|
|
338
|
-
], FocusSessionActionViewItem))
|
|
340
|
+
FocusSessionActionViewItem = ( __decorate([
|
|
341
|
+
( __param(2, IDebugService)),
|
|
342
|
+
( __param(3, IContextViewService)),
|
|
343
|
+
( __param(4, IConfigurationService))
|
|
344
|
+
], FocusSessionActionViewItem));
|
|
339
345
|
|
|
340
346
|
export { FocusSessionActionViewItem, StartDebugActionViewItem };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { ILanguageService } from "vscode/vscode/vs/editor/common/languages/language";
|
|
4
|
+
import { ITextModel } from "vscode/vscode/vs/editor/common/model";
|
|
5
|
+
import { IMenuService } from "vscode/vscode/vs/platform/actions/common/actions.service";
|
|
6
|
+
import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
|
|
7
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
8
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
9
|
+
import { IDialogService } from "vscode/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
10
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
11
|
+
import { IQuickInputService } from "vscode/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
12
|
+
import { IWorkspaceFolder } from "vscode/vscode/vs/platform/workspace/common/workspace";
|
|
13
|
+
import { IAdapterDescriptor, IAdapterManager, IConfig, IConfigurationManager, IDebugAdapter, IDebugAdapterDescriptorFactory, IDebugAdapterFactory, IDebugSession, IGuessedDebugger } from "vscode/vscode/vs/workbench/contrib/debug/common/debug";
|
|
14
|
+
import { Debugger } from "../common/debugger.js";
|
|
15
|
+
import { ITaskService } from "vscode/vscode/vs/workbench/contrib/tasks/common/taskService.service";
|
|
16
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
17
|
+
import { IExtensionService } from "vscode/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
18
|
+
import { ILifecycleService } from "vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
19
|
+
export interface IAdapterManagerDelegate {
|
|
20
|
+
onDidNewSession: Event<IDebugSession>;
|
|
21
|
+
configurationManager(): IConfigurationManager;
|
|
22
|
+
}
|
|
23
|
+
export declare class AdapterManager extends Disposable implements IAdapterManager {
|
|
24
|
+
private readonly delegate;
|
|
25
|
+
private readonly editorService;
|
|
26
|
+
private readonly configurationService;
|
|
27
|
+
private readonly quickInputService;
|
|
28
|
+
private readonly instantiationService;
|
|
29
|
+
private readonly commandService;
|
|
30
|
+
private readonly extensionService;
|
|
31
|
+
private readonly contextKeyService;
|
|
32
|
+
private readonly languageService;
|
|
33
|
+
private readonly dialogService;
|
|
34
|
+
private readonly lifecycleService;
|
|
35
|
+
private readonly tasksService;
|
|
36
|
+
private readonly menuService;
|
|
37
|
+
private debuggers;
|
|
38
|
+
private adapterDescriptorFactories;
|
|
39
|
+
private debugAdapterFactories;
|
|
40
|
+
private debuggersAvailable;
|
|
41
|
+
private debugExtensionsAvailable;
|
|
42
|
+
private readonly _onDidRegisterDebugger;
|
|
43
|
+
private readonly _onDidDebuggersExtPointRead;
|
|
44
|
+
private breakpointContributions;
|
|
45
|
+
private debuggerWhenKeys;
|
|
46
|
+
private taskLabels;
|
|
47
|
+
private earlyActivatedExtensions;
|
|
48
|
+
private usedDebugTypes;
|
|
49
|
+
constructor(delegate: IAdapterManagerDelegate, editorService: IEditorService, configurationService: IConfigurationService, quickInputService: IQuickInputService, instantiationService: IInstantiationService, commandService: ICommandService, extensionService: IExtensionService, contextKeyService: IContextKeyService, languageService: ILanguageService, dialogService: IDialogService, lifecycleService: ILifecycleService, tasksService: ITaskService, menuService: IMenuService);
|
|
50
|
+
private registerListeners;
|
|
51
|
+
private updateTaskLabels;
|
|
52
|
+
private updateDebugAdapterSchema;
|
|
53
|
+
registerDebugAdapterFactory(debugTypes: string[], debugAdapterLauncher: IDebugAdapterFactory): IDisposable;
|
|
54
|
+
hasEnabledDebuggers(): boolean;
|
|
55
|
+
createDebugAdapter(session: IDebugSession): IDebugAdapter | undefined;
|
|
56
|
+
substituteVariables(debugType: string, folder: IWorkspaceFolder | undefined, config: IConfig): Promise<IConfig>;
|
|
57
|
+
runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments, sessionId: string): Promise<number | undefined>;
|
|
58
|
+
registerDebugAdapterDescriptorFactory(debugAdapterProvider: IDebugAdapterDescriptorFactory): IDisposable;
|
|
59
|
+
unregisterDebugAdapterDescriptorFactory(debugAdapterProvider: IDebugAdapterDescriptorFactory): void;
|
|
60
|
+
getDebugAdapterDescriptor(session: IDebugSession): Promise<IAdapterDescriptor | undefined>;
|
|
61
|
+
getDebuggerLabel(type: string): string | undefined;
|
|
62
|
+
get onDidRegisterDebugger(): Event<void>;
|
|
63
|
+
get onDidDebuggersExtPointRead(): Event<void>;
|
|
64
|
+
canSetBreakpointsIn(model: ITextModel): boolean;
|
|
65
|
+
getDebugger(type: string): Debugger | undefined;
|
|
66
|
+
getEnabledDebugger(type: string): Debugger | undefined;
|
|
67
|
+
someDebuggerInterestedInLanguage(languageId: string): boolean;
|
|
68
|
+
guessDebugger(gettingConfigurations: boolean): Promise<IGuessedDebugger | undefined>;
|
|
69
|
+
private initExtensionActivationsIfNeeded;
|
|
70
|
+
activateDebuggers(activationEvent: string, debugType?: string): Promise<void>;
|
|
71
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
3
4
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
4
5
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import Severity
|
|
6
|
+
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
6
7
|
import { equalsIgnoreCase } from 'vscode/vscode/vs/base/common/strings';
|
|
7
8
|
import { isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
8
9
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
@@ -23,15 +24,17 @@ import { Debugger } from '../common/debugger.js';
|
|
|
23
24
|
import { debuggersExtPoint, breakpointsExtPoint, launchSchema, presentationSchema } from '../common/debugSchemas.js';
|
|
24
25
|
import { TaskDefinitionRegistry } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry';
|
|
25
26
|
import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService.service';
|
|
26
|
-
import { launchSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
|
|
27
|
+
import { launchSchemaId } from '@codingame/monaco-vscode-37e80bf5-92f5-5e4c-8b6d-98e0bb89dbef-common/vscode/vs/workbench/services/configuration/common/configuration';
|
|
27
28
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
28
29
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
30
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
29
31
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
30
32
|
|
|
31
|
-
const jsonRegistry = (
|
|
33
|
+
const jsonRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
32
34
|
let AdapterManager = class AdapterManager extends Disposable {
|
|
33
35
|
constructor(delegate, editorService, configurationService, quickInputService, instantiationService, commandService, extensionService, contextKeyService, languageService, dialogService, lifecycleService, tasksService, menuService) {
|
|
34
36
|
super();
|
|
37
|
+
this.delegate = delegate;
|
|
35
38
|
this.editorService = editorService;
|
|
36
39
|
this.configurationService = configurationService;
|
|
37
40
|
this.quickInputService = quickInputService;
|
|
@@ -44,13 +47,13 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
44
47
|
this.lifecycleService = lifecycleService;
|
|
45
48
|
this.tasksService = tasksService;
|
|
46
49
|
this.menuService = menuService;
|
|
47
|
-
this.debugAdapterFactories = (
|
|
48
|
-
this._onDidRegisterDebugger = (
|
|
49
|
-
this._onDidDebuggersExtPointRead = (
|
|
50
|
+
this.debugAdapterFactories = ( new Map());
|
|
51
|
+
this._onDidRegisterDebugger = ( new Emitter());
|
|
52
|
+
this._onDidDebuggersExtPointRead = ( new Emitter());
|
|
50
53
|
this.breakpointContributions = [];
|
|
51
|
-
this.debuggerWhenKeys = (
|
|
54
|
+
this.debuggerWhenKeys = ( new Set());
|
|
52
55
|
this.taskLabels = [];
|
|
53
|
-
this.usedDebugTypes = (
|
|
56
|
+
this.usedDebugTypes = ( new Set());
|
|
54
57
|
this.adapterDescriptorFactories = [];
|
|
55
58
|
this.debuggers = [];
|
|
56
59
|
this.registerListeners();
|
|
@@ -67,12 +70,12 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
67
70
|
this._register(this.onDidDebuggersExtPointRead(() => {
|
|
68
71
|
this.debugExtensionsAvailable.set(this.debuggers.length > 0);
|
|
69
72
|
}));
|
|
70
|
-
const updateTaskScheduler = this._register((
|
|
73
|
+
const updateTaskScheduler = this._register(( new RunOnceScheduler(() => this.updateTaskLabels(), 5000)));
|
|
71
74
|
this._register(Event.any(tasksService.onDidChangeTaskConfig, tasksService.onDidChangeTaskProviders)(() => {
|
|
72
75
|
updateTaskScheduler.cancel();
|
|
73
76
|
updateTaskScheduler.schedule();
|
|
74
77
|
}));
|
|
75
|
-
this.lifecycleService.when(
|
|
78
|
+
this.lifecycleService.when(LifecyclePhase.Eventually)
|
|
76
79
|
.then(() => this.debugExtensionsAvailable.set(this.debuggers.length > 0));
|
|
77
80
|
this._register(delegate.onDidNewSession(s => {
|
|
78
81
|
this.usedDebugTypes.add(s.configuration.type);
|
|
@@ -84,7 +87,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
84
87
|
delta.added.forEach(added => {
|
|
85
88
|
added.value.forEach(rawAdapter => {
|
|
86
89
|
if (!rawAdapter.type || (typeof rawAdapter.type !== 'string')) {
|
|
87
|
-
added.collector.error(( localize(
|
|
90
|
+
added.collector.error(( localize(5182, "Debugger 'type' can not be omitted and must be of type 'string'.")));
|
|
88
91
|
}
|
|
89
92
|
if (rawAdapter.type !== '*') {
|
|
90
93
|
const existing = this.getDebugger(rawAdapter.type);
|
|
@@ -107,21 +110,21 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
107
110
|
});
|
|
108
111
|
});
|
|
109
112
|
delta.removed.forEach(removed => {
|
|
110
|
-
const removedTypes = (
|
|
113
|
+
const removedTypes = ( removed.value.map(rawAdapter => rawAdapter.type));
|
|
111
114
|
this.debuggers = this.debuggers.filter(d => removedTypes.indexOf(d.type) === -1);
|
|
112
115
|
});
|
|
113
116
|
this.updateDebugAdapterSchema();
|
|
114
117
|
this._onDidDebuggersExtPointRead.fire();
|
|
115
118
|
});
|
|
116
119
|
breakpointsExtPoint.setHandler(extensions => {
|
|
117
|
-
this.breakpointContributions = extensions.flatMap(ext => (
|
|
120
|
+
this.breakpointContributions = extensions.flatMap(ext => ( ext.value.map(
|
|
118
121
|
breakpoint => this.instantiationService.createInstance(Breakpoints, breakpoint)
|
|
119
|
-
)))
|
|
122
|
+
)));
|
|
120
123
|
});
|
|
121
124
|
}
|
|
122
125
|
updateTaskLabels() {
|
|
123
126
|
this.tasksService.getKnownTasks().then(tasks => {
|
|
124
|
-
this.taskLabels = (
|
|
127
|
+
this.taskLabels = ( tasks.map(task => task._label));
|
|
125
128
|
this.updateDebugAdapterSchema();
|
|
126
129
|
});
|
|
127
130
|
}
|
|
@@ -134,7 +137,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
134
137
|
'name': {
|
|
135
138
|
type: 'string',
|
|
136
139
|
description: ( localize(
|
|
137
|
-
|
|
140
|
+
5183,
|
|
138
141
|
"Name of configuration; appears in the launch configuration dropdown menu."
|
|
139
142
|
)),
|
|
140
143
|
default: 'Launch'
|
|
@@ -142,7 +145,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
142
145
|
'debugServer': {
|
|
143
146
|
type: 'number',
|
|
144
147
|
description: ( localize(
|
|
145
|
-
|
|
148
|
+
5184,
|
|
146
149
|
"For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode"
|
|
147
150
|
)),
|
|
148
151
|
default: 4711
|
|
@@ -153,7 +156,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
153
156
|
}],
|
|
154
157
|
default: '',
|
|
155
158
|
defaultSnippets: [{ body: { task: '', type: '' } }],
|
|
156
|
-
description: ( localize(
|
|
159
|
+
description: ( localize(5185, "Task to run before debug session starts.")),
|
|
157
160
|
examples: this.taskLabels,
|
|
158
161
|
},
|
|
159
162
|
'postDebugTask': {
|
|
@@ -162,7 +165,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
162
165
|
}],
|
|
163
166
|
default: '',
|
|
164
167
|
defaultSnippets: [{ body: { task: '', type: '' } }],
|
|
165
|
-
description: ( localize(
|
|
168
|
+
description: ( localize(5186, "Task to run after debug session ends.")),
|
|
166
169
|
examples: this.taskLabels,
|
|
167
170
|
},
|
|
168
171
|
'presentation': presentationSchema,
|
|
@@ -170,7 +173,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
170
173
|
'suppressMultipleSessionWarning': {
|
|
171
174
|
type: 'boolean',
|
|
172
175
|
description: ( localize(
|
|
173
|
-
|
|
176
|
+
5187,
|
|
174
177
|
"Disable the warning when trying to start the same debug configuration more than once."
|
|
175
178
|
)),
|
|
176
179
|
default: true
|
|
@@ -231,7 +234,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
231
234
|
if (factory) {
|
|
232
235
|
return factory.runInTerminal(args, sessionId);
|
|
233
236
|
}
|
|
234
|
-
return Promise.resolve(
|
|
237
|
+
return Promise.resolve(undefined);
|
|
235
238
|
}
|
|
236
239
|
registerDebugAdapterDescriptorFactory(debugAdapterProvider) {
|
|
237
240
|
this.adapterDescriptorFactories.push(debugAdapterProvider);
|
|
@@ -276,9 +279,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
276
279
|
if (this.configurationService.getValue('debug').allowBreakpointsEverywhere) {
|
|
277
280
|
return true;
|
|
278
281
|
}
|
|
279
|
-
return (
|
|
280
|
-
(this.breakpointContributions.some(breakpoints => breakpoints.language === languageId && breakpoints.enabled))
|
|
281
|
-
);
|
|
282
|
+
return ( this.breakpointContributions.some(breakpoints => breakpoints.language === languageId && breakpoints.enabled));
|
|
282
283
|
}
|
|
283
284
|
getDebugger(type) {
|
|
284
285
|
return this.debuggers.find(dbg => equalsIgnoreCase(dbg.type, type));
|
|
@@ -307,7 +308,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
307
308
|
.filter(a => a.enabled)
|
|
308
309
|
.filter(a => language && a.interestedInLanguage(language));
|
|
309
310
|
if (adapters.length === 1) {
|
|
310
|
-
return adapters[0];
|
|
311
|
+
return { debugger: adapters[0] };
|
|
311
312
|
}
|
|
312
313
|
if (adapters.length > 1) {
|
|
313
314
|
candidates = adapters;
|
|
@@ -324,13 +325,13 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
324
325
|
languageLabel = `'${languageLabel}'`;
|
|
325
326
|
}
|
|
326
327
|
const { confirmed } = await this.dialogService.confirm({
|
|
327
|
-
type: Severity
|
|
328
|
+
type: Severity.Warning,
|
|
328
329
|
message: ( localize(
|
|
329
|
-
|
|
330
|
+
5188,
|
|
330
331
|
"You don't have an extension for debugging {0}. Should we find a {0} extension in the Marketplace?",
|
|
331
332
|
languageLabel
|
|
332
333
|
)),
|
|
333
|
-
primaryButton: ( localize(
|
|
334
|
+
primaryButton: ( localize(5189, "&&Find {0} extension", languageLabel))
|
|
334
335
|
});
|
|
335
336
|
if (confirmed) {
|
|
336
337
|
await this.commandService.executeCommand('debug.installAdditionalDebuggers', languageLabel);
|
|
@@ -347,7 +348,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
347
348
|
if (descriptor.id && !!this.earlyActivatedExtensions?.has(descriptor.id)) {
|
|
348
349
|
suggestedCandidates.push(d);
|
|
349
350
|
}
|
|
350
|
-
else if ((
|
|
351
|
+
else if (( this.usedDebugTypes.has(d.type))) {
|
|
351
352
|
suggestedCandidates.push(d);
|
|
352
353
|
}
|
|
353
354
|
else {
|
|
@@ -355,29 +356,46 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
355
356
|
}
|
|
356
357
|
});
|
|
357
358
|
const picks = [];
|
|
359
|
+
const dynamic = await this.delegate.configurationManager().getDynamicProviders();
|
|
358
360
|
if (suggestedCandidates.length > 0) {
|
|
359
|
-
picks.push({ type: 'separator', label: ( localize(
|
|
361
|
+
picks.push({ type: 'separator', label: ( localize(5190, "Suggested")) }, ...( suggestedCandidates.map(c => ({ label: c.label, pick: () => ({ debugger: c }) }))));
|
|
360
362
|
}
|
|
361
363
|
if (otherCandidates.length > 0) {
|
|
362
364
|
if (picks.length > 0) {
|
|
363
365
|
picks.push({ type: 'separator', label: '' });
|
|
364
366
|
}
|
|
365
|
-
picks.push(...(
|
|
367
|
+
picks.push(...( otherCandidates.map(c => ({ label: c.label, pick: () => ({ debugger: c }) }))));
|
|
368
|
+
}
|
|
369
|
+
if (dynamic.length) {
|
|
370
|
+
if (picks.length) {
|
|
371
|
+
picks.push({ type: 'separator', label: '' });
|
|
372
|
+
}
|
|
373
|
+
for (const d of dynamic) {
|
|
374
|
+
picks.push({
|
|
375
|
+
label: ( localize(5191, "More {0} options...", d.label)),
|
|
376
|
+
pick: async () => {
|
|
377
|
+
const cfg = await d.pick();
|
|
378
|
+
if (!cfg) {
|
|
379
|
+
return undefined;
|
|
380
|
+
}
|
|
381
|
+
return cfg && { debugger: this.getDebugger(d.type), withConfig: cfg };
|
|
382
|
+
},
|
|
383
|
+
});
|
|
384
|
+
}
|
|
366
385
|
}
|
|
367
|
-
picks.push({ type: 'separator', label: '' }, { label: languageLabel ? ( localize(
|
|
386
|
+
picks.push({ type: 'separator', label: '' }, { label: languageLabel ? ( localize(5192, "Install an extension for {0}...", languageLabel)) : ( localize(5193, "Install extension...")) });
|
|
368
387
|
const contributed = this.menuService.getMenuActions(MenuId.DebugCreateConfiguration, this.contextKeyService);
|
|
369
388
|
for (const [, action] of contributed) {
|
|
370
389
|
for (const item of action) {
|
|
371
390
|
picks.push(item);
|
|
372
391
|
}
|
|
373
392
|
}
|
|
374
|
-
const placeHolder = ( localize(
|
|
375
|
-
return this.quickInputService.pick(picks, { activeItem: picks[0], placeHolder })
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return picked.debugger;
|
|
393
|
+
const placeHolder = ( localize(5194, "Select debugger"));
|
|
394
|
+
return this.quickInputService.pick(picks, { activeItem: picks[0], placeHolder }).then(async (picked) => {
|
|
395
|
+
if (picked && 'pick' in picked && typeof picked.pick === 'function') {
|
|
396
|
+
return await picked.pick();
|
|
379
397
|
}
|
|
380
|
-
|
|
398
|
+
if (picked instanceof MenuItemAction) {
|
|
381
399
|
picked.run();
|
|
382
400
|
return;
|
|
383
401
|
}
|
|
@@ -389,7 +407,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
389
407
|
}
|
|
390
408
|
initExtensionActivationsIfNeeded() {
|
|
391
409
|
if (!this.earlyActivatedExtensions) {
|
|
392
|
-
this.earlyActivatedExtensions = (
|
|
410
|
+
this.earlyActivatedExtensions = ( new Set());
|
|
393
411
|
const status = this.extensionService.getExtensionsStatus();
|
|
394
412
|
for (const id in status) {
|
|
395
413
|
if (!!status[id].activationTimes) {
|
|
@@ -410,19 +428,19 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
410
428
|
await Promise.all(promises);
|
|
411
429
|
}
|
|
412
430
|
};
|
|
413
|
-
AdapterManager = (
|
|
414
|
-
(
|
|
415
|
-
(
|
|
416
|
-
(
|
|
417
|
-
(
|
|
418
|
-
(
|
|
419
|
-
(
|
|
420
|
-
(
|
|
421
|
-
(
|
|
422
|
-
(
|
|
423
|
-
(
|
|
424
|
-
(
|
|
425
|
-
(
|
|
426
|
-
], AdapterManager))
|
|
431
|
+
AdapterManager = ( __decorate([
|
|
432
|
+
( __param(1, IEditorService)),
|
|
433
|
+
( __param(2, IConfigurationService)),
|
|
434
|
+
( __param(3, IQuickInputService)),
|
|
435
|
+
( __param(4, IInstantiationService)),
|
|
436
|
+
( __param(5, ICommandService)),
|
|
437
|
+
( __param(6, IExtensionService)),
|
|
438
|
+
( __param(7, IContextKeyService)),
|
|
439
|
+
( __param(8, ILanguageService)),
|
|
440
|
+
( __param(9, IDialogService)),
|
|
441
|
+
( __param(10, ILifecycleService)),
|
|
442
|
+
( __param(11, ITaskService)),
|
|
443
|
+
( __param(12, IMenuService))
|
|
444
|
+
], AdapterManager));
|
|
427
445
|
|
|
428
446
|
export { AdapterManager };
|