@codingame/monaco-vscode-debug-service-override 4.0.0 → 4.1.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/debug.js +4 -4
- package/package.json +2 -2
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/external/tslib/tslib.es6.js +0 -11
- package/override/vs/platform/dialogs/common/dialogs.js +0 -10
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +0 -73
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +0 -1026
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +0 -1004
- package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +0 -337
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +0 -432
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -1039
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +0 -649
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +0 -64
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +0 -636
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +0 -740
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +0 -408
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +0 -206
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +0 -80
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +0 -169
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +0 -1271
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +0 -1330
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -115
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +0 -77
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +0 -307
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +0 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +0 -387
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +0 -267
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +0 -817
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +0 -131
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +0 -142
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +0 -262
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +0 -669
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +0 -709
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +0 -1002
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +0 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +0 -352
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +0 -129
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +0 -734
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +0 -501
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +0 -162
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +0 -21
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +0 -17
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +0 -110
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +0 -62
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +0 -460
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +0 -166
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +0 -36
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +0 -150
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +0 -289
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -87
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +0 -64
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +0 -311
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +0 -29
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { $, append, addDisposableGenericMouseUpListener, getWindow, addDisposableGenericMouseDownListener, addDisposableListener, EventType, show, hide } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
|
-
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
4
|
-
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
5
|
-
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
6
|
-
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
7
|
-
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
8
|
-
import { isCancellationError } from 'vscode/vscode/vs/base/common/errors';
|
|
9
|
-
import { dispose, DisposableStore, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
|
-
import './media/debugToolBar.css.js';
|
|
11
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
12
|
-
import { DropdownWithPrimaryActionViewItem } from 'vscode/vscode/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem';
|
|
13
|
-
import { createActionViewItem, createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
14
|
-
import { MenuRegistry, MenuId, IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
15
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
16
|
-
import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
17
|
-
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
|
|
18
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
19
|
-
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
20
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
21
|
-
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
22
|
-
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
23
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/baseColors';
|
|
24
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
25
|
-
import { widgetShadow, widgetBorder } from 'vscode/vscode/vs/platform/theme/common/colors/editorColors';
|
|
26
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/inputColors';
|
|
27
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/listColors';
|
|
28
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/menuColors';
|
|
29
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/minimapColors';
|
|
30
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
31
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
32
|
-
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
33
|
-
import { Themable, IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
34
|
-
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
35
|
-
import { FocusSessionActionViewItem } from './debugActionViewItems.js';
|
|
36
|
-
import { debugToolBarBackground, debugToolBarBorder } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugColors';
|
|
37
|
-
import { CONTINUE_LABEL, CONTINUE_ID, PAUSE_LABEL, PAUSE_ID, DISCONNECT_ID, DISCONNECT_LABEL, STOP_LABEL, STOP_ID, STEP_OVER_LABEL, STEP_OVER_ID, STEP_INTO_LABEL, STEP_INTO_ID, STEP_OUT_LABEL, STEP_OUT_ID, STEP_BACK_ID, REVERSE_CONTINUE_ID, FOCUS_SESSION_LABEL, FOCUS_SESSION_ID, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL, RESTART_LABEL, RESTART_SESSION_ID } from './debugCommands.js';
|
|
38
|
-
import { debugContinue, debugPause, debugDisconnect, debugStop, debugStepOver, debugStepInto, debugStepOut, debugStepBack, debugReverseContinue, debugGripper, debugRestart } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
39
|
-
import { VIEWLET_ID, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_MULTI_SESSION_DEBUG, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
40
|
-
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
41
|
-
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
42
|
-
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
43
|
-
import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
44
|
-
import { PixelRatio } from 'vscode/vscode/vs/base/browser/pixelRatio';
|
|
45
|
-
|
|
46
|
-
const DEBUG_TOOLBAR_POSITION_KEY = 'debug.actionswidgetposition';
|
|
47
|
-
const DEBUG_TOOLBAR_Y_KEY = 'debug.actionswidgety';
|
|
48
|
-
let DebugToolBar = class DebugToolBar extends Themable {
|
|
49
|
-
constructor(notificationService, telemetryService, debugService, layoutService, storageService, configurationService, themeService, instantiationService, menuService, contextKeyService) {
|
|
50
|
-
super(themeService);
|
|
51
|
-
this.notificationService = notificationService;
|
|
52
|
-
this.telemetryService = telemetryService;
|
|
53
|
-
this.debugService = debugService;
|
|
54
|
-
this.layoutService = layoutService;
|
|
55
|
-
this.storageService = storageService;
|
|
56
|
-
this.configurationService = configurationService;
|
|
57
|
-
this.instantiationService = instantiationService;
|
|
58
|
-
this.yCoordinate = 0;
|
|
59
|
-
this.isVisible = false;
|
|
60
|
-
this.isBuilt = false;
|
|
61
|
-
this.stopActionViewItemDisposables = this._register(( new DisposableStore()));
|
|
62
|
-
this.auxWindowCoordinates = ( new WeakMap());
|
|
63
|
-
this.trackPixelRatioListener = this._register(( new MutableDisposable()));
|
|
64
|
-
this.$el = $('div.debug-toolbar');
|
|
65
|
-
this.$el.style.top = `${layoutService.mainContainerOffset.top}px`;
|
|
66
|
-
this.dragArea = append(this.$el, $('div.drag-area' + ThemeIcon.asCSSSelector(debugGripper)));
|
|
67
|
-
const actionBarContainer = append(this.$el, $('div.action-bar-container'));
|
|
68
|
-
this.debugToolBarMenu = menuService.createMenu(MenuId.DebugToolBar, contextKeyService);
|
|
69
|
-
this._register(this.debugToolBarMenu);
|
|
70
|
-
this.activeActions = [];
|
|
71
|
-
this.actionBar = this._register(( new ActionBar(actionBarContainer, {
|
|
72
|
-
orientation: 0 ,
|
|
73
|
-
actionViewItemProvider: (action, options) => {
|
|
74
|
-
if (action.id === FOCUS_SESSION_ID) {
|
|
75
|
-
return this.instantiationService.createInstance(FocusSessionActionViewItem, action, undefined);
|
|
76
|
-
}
|
|
77
|
-
else if (action.id === STOP_ID || action.id === DISCONNECT_ID) {
|
|
78
|
-
this.stopActionViewItemDisposables.clear();
|
|
79
|
-
const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor, { hoverDelegate: options.hoverDelegate }));
|
|
80
|
-
if (item) {
|
|
81
|
-
return item;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return createActionViewItem(this.instantiationService, action, options);
|
|
85
|
-
}
|
|
86
|
-
})));
|
|
87
|
-
this.updateScheduler = this._register(( new RunOnceScheduler(() => {
|
|
88
|
-
const state = this.debugService.state;
|
|
89
|
-
const toolBarLocation = this.configurationService.getValue('debug').toolBarLocation;
|
|
90
|
-
if (state === 0 ||
|
|
91
|
-
toolBarLocation !== 'floating' ||
|
|
92
|
-
this.debugService.getModel().getSessions().every(s => s.suppressDebugToolbar) ||
|
|
93
|
-
(state === 1 && this.debugService.initializingOptions?.suppressDebugToolbar)) {
|
|
94
|
-
return this.hide();
|
|
95
|
-
}
|
|
96
|
-
const actions = [];
|
|
97
|
-
createAndFillInActionBarActions(this.debugToolBarMenu, { shouldForwardArgs: true }, actions);
|
|
98
|
-
if (!equals(actions, this.activeActions, (first, second) => first.id === second.id && first.enabled === second.enabled)) {
|
|
99
|
-
this.actionBar.clear();
|
|
100
|
-
this.actionBar.push(actions, { icon: true, label: false });
|
|
101
|
-
this.activeActions = actions;
|
|
102
|
-
}
|
|
103
|
-
this.show();
|
|
104
|
-
}, 20)));
|
|
105
|
-
this.updateStyles();
|
|
106
|
-
this.registerListeners();
|
|
107
|
-
this.hide();
|
|
108
|
-
}
|
|
109
|
-
registerListeners() {
|
|
110
|
-
this._register(this.debugService.onDidChangeState(() => this.updateScheduler.schedule()));
|
|
111
|
-
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
112
|
-
if (e.affectsConfiguration('debug.toolBarLocation')) {
|
|
113
|
-
this.updateScheduler.schedule();
|
|
114
|
-
}
|
|
115
|
-
if (e.affectsConfiguration("workbench.editor.showTabs" ) || e.affectsConfiguration("window.commandCenter" )) {
|
|
116
|
-
this._yRange = undefined;
|
|
117
|
-
this.setYCoordinate();
|
|
118
|
-
}
|
|
119
|
-
}));
|
|
120
|
-
this._register(this.debugToolBarMenu.onDidChange(() => this.updateScheduler.schedule()));
|
|
121
|
-
this._register(this.actionBar.actionRunner.onDidRun((e) => {
|
|
122
|
-
if (e.error && !isCancellationError(e.error)) {
|
|
123
|
-
this.notificationService.warn(e.error);
|
|
124
|
-
}
|
|
125
|
-
this.telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: 'debugActionsWidget' });
|
|
126
|
-
}));
|
|
127
|
-
this._register(addDisposableGenericMouseUpListener(this.dragArea, (event) => {
|
|
128
|
-
const mouseClickEvent = ( new StandardMouseEvent(getWindow(this.dragArea), event));
|
|
129
|
-
const activeWindow = getWindow(this.layoutService.activeContainer);
|
|
130
|
-
if (mouseClickEvent.detail === 2) {
|
|
131
|
-
const widgetWidth = this.$el.clientWidth;
|
|
132
|
-
this.setCoordinates(0.5 * activeWindow.innerWidth - 0.5 * widgetWidth, this.yDefault);
|
|
133
|
-
this.storePosition();
|
|
134
|
-
}
|
|
135
|
-
}));
|
|
136
|
-
this._register(addDisposableGenericMouseDownListener(this.dragArea, (event) => {
|
|
137
|
-
this.dragArea.classList.add('dragged');
|
|
138
|
-
getWindow(this.layoutService.activeContainer);
|
|
139
|
-
}));
|
|
140
|
-
this._register(this.layoutService.onDidChangePartVisibility(() => this.setYCoordinate()));
|
|
141
|
-
const resizeListener = this._register(( new MutableDisposable()));
|
|
142
|
-
this._register(this.layoutService.onDidChangeActiveContainer(async () => {
|
|
143
|
-
this._yRange = undefined;
|
|
144
|
-
await this.layoutService.whenContainerStylesLoaded(getWindow(this.layoutService.activeContainer));
|
|
145
|
-
if (this.isBuilt) {
|
|
146
|
-
this.doShowInActiveContainer();
|
|
147
|
-
this.setCoordinates();
|
|
148
|
-
}
|
|
149
|
-
resizeListener.value = this._register(addDisposableListener(getWindow(this.layoutService.activeContainer), EventType.RESIZE, () => this.setYCoordinate()));
|
|
150
|
-
}));
|
|
151
|
-
}
|
|
152
|
-
storePosition() {
|
|
153
|
-
const activeWindow = getWindow(this.layoutService.activeContainer);
|
|
154
|
-
const isMainWindow = this.layoutService.activeContainer === this.layoutService.mainContainer;
|
|
155
|
-
const left = this.$el.getBoundingClientRect().left / activeWindow.innerWidth;
|
|
156
|
-
if (isMainWindow) {
|
|
157
|
-
this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, left, 0 , 1 );
|
|
158
|
-
this.storageService.store(DEBUG_TOOLBAR_Y_KEY, this.yCoordinate, 0 , 1 );
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
this.auxWindowCoordinates.set(activeWindow, { x: left, y: this.yCoordinate });
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
updateStyles() {
|
|
165
|
-
super.updateStyles();
|
|
166
|
-
if (this.$el) {
|
|
167
|
-
this.$el.style.backgroundColor = this.getColor(debugToolBarBackground) || '';
|
|
168
|
-
const widgetShadowColor = this.getColor(widgetShadow);
|
|
169
|
-
this.$el.style.boxShadow = widgetShadowColor ? `0 0 8px 2px ${widgetShadowColor}` : '';
|
|
170
|
-
const contrastBorderColor = this.getColor(widgetBorder);
|
|
171
|
-
const borderColor = this.getColor(debugToolBarBorder);
|
|
172
|
-
if (contrastBorderColor) {
|
|
173
|
-
this.$el.style.border = `1px solid ${contrastBorderColor}`;
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
this.$el.style.border = borderColor ? `solid ${borderColor}` : 'none';
|
|
177
|
-
this.$el.style.border = '1px 0';
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
setCoordinates(x, y) {
|
|
182
|
-
if (!this.isVisible) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
const widgetWidth = this.$el.clientWidth;
|
|
186
|
-
const currentWindow = getWindow(this.layoutService.activeContainer);
|
|
187
|
-
const isMainWindow = currentWindow === mainWindow;
|
|
188
|
-
if (x === undefined) {
|
|
189
|
-
const positionPercentage = isMainWindow
|
|
190
|
-
? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, 0 ))
|
|
191
|
-
: this.auxWindowCoordinates.get(currentWindow)?.x;
|
|
192
|
-
x = positionPercentage !== undefined && !isNaN(positionPercentage)
|
|
193
|
-
? positionPercentage * currentWindow.innerWidth
|
|
194
|
-
: (0.5 * currentWindow.innerWidth - 0.5 * widgetWidth);
|
|
195
|
-
}
|
|
196
|
-
x = clamp(x, 0, currentWindow.innerWidth - widgetWidth);
|
|
197
|
-
this.$el.style.left = `${x}px`;
|
|
198
|
-
if (y === undefined) {
|
|
199
|
-
y = isMainWindow
|
|
200
|
-
? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, 0 )
|
|
201
|
-
: this.auxWindowCoordinates.get(currentWindow)?.y;
|
|
202
|
-
}
|
|
203
|
-
this.setYCoordinate(y ?? this.yDefault);
|
|
204
|
-
}
|
|
205
|
-
setYCoordinate(y = this.yCoordinate) {
|
|
206
|
-
const [yMin, yMax] = this.yRange;
|
|
207
|
-
y = Math.max(yMin, Math.min(y, yMax));
|
|
208
|
-
this.$el.style.top = `${y}px`;
|
|
209
|
-
this.yCoordinate = y;
|
|
210
|
-
}
|
|
211
|
-
get yDefault() {
|
|
212
|
-
return this.layoutService.mainContainerOffset.top;
|
|
213
|
-
}
|
|
214
|
-
get yRange() {
|
|
215
|
-
if (!this._yRange) {
|
|
216
|
-
const isTitleBarVisible = this.layoutService.isVisible("workbench.parts.titlebar" , getWindow(this.layoutService.activeContainer));
|
|
217
|
-
const yMin = isTitleBarVisible ? 0 : this.layoutService.mainContainerOffset.top;
|
|
218
|
-
let yMax = 0;
|
|
219
|
-
if (isTitleBarVisible) {
|
|
220
|
-
if (this.configurationService.getValue("window.commandCenter" ) === true) {
|
|
221
|
-
yMax += 35;
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
yMax += 28;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
if (this.configurationService.getValue("workbench.editor.showTabs" ) !== "none" ) {
|
|
228
|
-
yMax += 35;
|
|
229
|
-
}
|
|
230
|
-
this._yRange = [yMin, yMax];
|
|
231
|
-
}
|
|
232
|
-
return this._yRange;
|
|
233
|
-
}
|
|
234
|
-
show() {
|
|
235
|
-
if (this.isVisible) {
|
|
236
|
-
this.setCoordinates();
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
if (!this.isBuilt) {
|
|
240
|
-
this.isBuilt = true;
|
|
241
|
-
this.doShowInActiveContainer();
|
|
242
|
-
}
|
|
243
|
-
this.isVisible = true;
|
|
244
|
-
show(this.$el);
|
|
245
|
-
this.setCoordinates();
|
|
246
|
-
}
|
|
247
|
-
doShowInActiveContainer() {
|
|
248
|
-
this.layoutService.activeContainer.appendChild(this.$el);
|
|
249
|
-
this.trackPixelRatioListener.value = PixelRatio.getInstance(getWindow(this.$el)).onDidChange(() => this.setYCoordinate());
|
|
250
|
-
}
|
|
251
|
-
hide() {
|
|
252
|
-
this.isVisible = false;
|
|
253
|
-
hide(this.$el);
|
|
254
|
-
}
|
|
255
|
-
dispose() {
|
|
256
|
-
super.dispose();
|
|
257
|
-
this.$el?.remove();
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
DebugToolBar = ( __decorate([
|
|
261
|
-
( __param(0, INotificationService)),
|
|
262
|
-
( __param(1, ITelemetryService)),
|
|
263
|
-
( __param(2, IDebugService)),
|
|
264
|
-
( __param(3, IWorkbenchLayoutService)),
|
|
265
|
-
( __param(4, IStorageService)),
|
|
266
|
-
( __param(5, IConfigurationService)),
|
|
267
|
-
( __param(6, IThemeService)),
|
|
268
|
-
( __param(7, IInstantiationService)),
|
|
269
|
-
( __param(8, IMenuService)),
|
|
270
|
-
( __param(9, IContextKeyService))
|
|
271
|
-
], DebugToolBar));
|
|
272
|
-
function createDisconnectMenuItemAction(action, disposables, accessor, options) {
|
|
273
|
-
const menuService = accessor.get(IMenuService);
|
|
274
|
-
const contextKeyService = accessor.get(IContextKeyService);
|
|
275
|
-
const instantiationService = accessor.get(IInstantiationService);
|
|
276
|
-
const contextMenuService = accessor.get(IContextMenuService);
|
|
277
|
-
const menu = menuService.createMenu(MenuId.DebugToolBarStop, contextKeyService);
|
|
278
|
-
const secondary = [];
|
|
279
|
-
createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, secondary);
|
|
280
|
-
if (!secondary.length) {
|
|
281
|
-
return undefined;
|
|
282
|
-
}
|
|
283
|
-
const dropdownAction = disposables.add(( new Action('notebook.moreRunActions', ( localizeWithPath(
|
|
284
|
-
'vs/workbench/contrib/debug/browser/debugToolBar',
|
|
285
|
-
'notebook.moreRunActionsLabel',
|
|
286
|
-
"More..."
|
|
287
|
-
)), 'codicon-chevron-down', true)));
|
|
288
|
-
const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, secondary, 'debug-stop-actions', contextMenuService, options);
|
|
289
|
-
return item;
|
|
290
|
-
}
|
|
291
|
-
const debugViewTitleItems = [];
|
|
292
|
-
const registerDebugToolBarItem = (id, title, order, icon, when, precondition, alt) => {
|
|
293
|
-
MenuRegistry.appendMenuItem(MenuId.DebugToolBar, {
|
|
294
|
-
group: 'navigation',
|
|
295
|
-
when,
|
|
296
|
-
order,
|
|
297
|
-
command: {
|
|
298
|
-
id,
|
|
299
|
-
title,
|
|
300
|
-
icon,
|
|
301
|
-
precondition
|
|
302
|
-
},
|
|
303
|
-
alt
|
|
304
|
-
});
|
|
305
|
-
debugViewTitleItems.push(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
306
|
-
group: 'navigation',
|
|
307
|
-
when: ( ContextKeyExpr.and(when, ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked')))),
|
|
308
|
-
order,
|
|
309
|
-
command: {
|
|
310
|
-
id,
|
|
311
|
-
title,
|
|
312
|
-
icon,
|
|
313
|
-
precondition
|
|
314
|
-
}
|
|
315
|
-
}));
|
|
316
|
-
};
|
|
317
|
-
MenuRegistry.onDidChangeMenu(e => {
|
|
318
|
-
if (( e.has(MenuId.DebugToolBar))) {
|
|
319
|
-
dispose(debugViewTitleItems);
|
|
320
|
-
const items = MenuRegistry.getMenuItems(MenuId.DebugToolBar);
|
|
321
|
-
for (const i of items) {
|
|
322
|
-
debugViewTitleItems.push(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
323
|
-
...i,
|
|
324
|
-
when: ( ContextKeyExpr.and(i.when, ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked'))))
|
|
325
|
-
}));
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
const CONTEXT_TOOLBAR_COMMAND_CENTER = ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'commandCenter'));
|
|
330
|
-
MenuRegistry.appendMenuItem(MenuId.CommandCenterCenter, {
|
|
331
|
-
submenu: MenuId.DebugToolBar,
|
|
332
|
-
title: 'Debug',
|
|
333
|
-
icon: Codicon.debug,
|
|
334
|
-
order: 1,
|
|
335
|
-
when: ( ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_TOOLBAR_COMMAND_CENTER))
|
|
336
|
-
});
|
|
337
|
-
registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, debugContinue, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
338
|
-
registerDebugToolBarItem(PAUSE_ID, PAUSE_LABEL, 10, debugPause, ( CONTEXT_DEBUG_STATE.notEqualsTo('stopped')), ( ContextKeyExpr.and(( CONTEXT_DEBUG_STATE.isEqualTo('running')), ( CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG.toNegated()))));
|
|
339
|
-
registerDebugToolBarItem(STOP_ID, STOP_LABEL, 70, debugStop, ( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), undefined, { id: DISCONNECT_ID, title: DISCONNECT_LABEL, icon: debugDisconnect, precondition: ( ContextKeyExpr.and(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)), });
|
|
340
|
-
registerDebugToolBarItem(DISCONNECT_ID, DISCONNECT_LABEL, 70, debugDisconnect, CONTEXT_FOCUSED_SESSION_IS_ATTACH, undefined, { id: STOP_ID, title: STOP_LABEL, icon: debugStop, precondition: ( ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)), });
|
|
341
|
-
registerDebugToolBarItem(STEP_OVER_ID, STEP_OVER_LABEL, 20, debugStepOver, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
342
|
-
registerDebugToolBarItem(STEP_INTO_ID, STEP_INTO_LABEL, 30, debugStepInto, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
343
|
-
registerDebugToolBarItem(STEP_OUT_ID, STEP_OUT_LABEL, 40, debugStepOut, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
344
|
-
registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, 60, debugRestart);
|
|
345
|
-
registerDebugToolBarItem(STEP_BACK_ID, ( localizeWithPath(
|
|
346
|
-
'vs/workbench/contrib/debug/browser/debugToolBar',
|
|
347
|
-
'stepBackDebug',
|
|
348
|
-
"Step Back"
|
|
349
|
-
)), 50, debugStepBack, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
350
|
-
registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localizeWithPath(
|
|
351
|
-
'vs/workbench/contrib/debug/browser/debugToolBar',
|
|
352
|
-
'reverseContinue',
|
|
353
|
-
"Reverse"
|
|
354
|
-
)), 55, debugReverseContinue, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
355
|
-
registerDebugToolBarItem(FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, 100, Codicon.listTree, ( ContextKeyExpr.and(CONTEXT_MULTI_SESSION_DEBUG, ( CONTEXT_TOOLBAR_COMMAND_CENTER.negate()))));
|
|
356
|
-
MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
357
|
-
group: 'navigation',
|
|
358
|
-
when: ( ContextKeyExpr.and(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
|
|
359
|
-
order: 0,
|
|
360
|
-
command: {
|
|
361
|
-
id: DISCONNECT_ID,
|
|
362
|
-
title: DISCONNECT_LABEL,
|
|
363
|
-
icon: debugDisconnect
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
367
|
-
group: 'navigation',
|
|
368
|
-
when: ( ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
|
|
369
|
-
order: 0,
|
|
370
|
-
command: {
|
|
371
|
-
id: STOP_ID,
|
|
372
|
-
title: STOP_LABEL,
|
|
373
|
-
icon: debugStop
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
|
-
MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
377
|
-
group: 'navigation',
|
|
378
|
-
when: ( ContextKeyExpr.or(( ContextKeyExpr.and(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)), ( ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED)))),
|
|
379
|
-
order: 0,
|
|
380
|
-
command: {
|
|
381
|
-
id: DISCONNECT_AND_SUSPEND_ID,
|
|
382
|
-
title: DISCONNECT_AND_SUSPEND_LABEL,
|
|
383
|
-
icon: debugDisconnect
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
export { DebugToolBar, createDisconnectMenuItemAction };
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import './media/debugViewlet.css.js';
|
|
4
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
5
|
-
import { createActionViewItem } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
6
|
-
import { MenuRegistry, MenuId, registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
8
|
-
import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
|
-
import { IContextMenuService, IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
|
|
10
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
11
|
-
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
12
|
-
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
|
|
13
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
14
|
-
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
15
|
-
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
16
|
-
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
17
|
-
import { ViewsSubMenu, ViewPaneContainer } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
18
|
-
import { WorkbenchStateContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
19
|
-
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
20
|
-
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
|
|
21
|
-
import { StartDebugActionViewItem, FocusSessionActionViewItem } from './debugActionViewItems.js';
|
|
22
|
-
import { DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL, SELECT_AND_START_ID, FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID } from './debugCommands.js';
|
|
23
|
-
import { debugConfigure } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
24
|
-
import { createDisconnectMenuItemAction } from './debugToolBar.js';
|
|
25
|
-
import { WelcomeView } from './welcomeView.js';
|
|
26
|
-
import { VIEWLET_ID, CONTEXT_DEBUG_UX, CONTEXT_DEBUG_STATE, getStateLabel, CONTEXT_DEBUGGERS_AVAILABLE, IDebugService, REPL_VIEW_ID, CONTEXT_DEBUG_UX_KEY, BREAKPOINTS_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
27
|
-
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
28
|
-
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
29
|
-
|
|
30
|
-
let DebugViewPaneContainer = class DebugViewPaneContainer extends ViewPaneContainer {
|
|
31
|
-
constructor(layoutService, telemetryService, progressService, debugService, instantiationService, contextService, storageService, themeService, contextMenuService, extensionService, configurationService, contextViewService, contextKeyService, viewDescriptorService) {
|
|
32
|
-
super(VIEWLET_ID, { mergeViewWithContainerWhenSingleView: true }, instantiationService, configurationService, layoutService, contextMenuService, telemetryService, extensionService, themeService, storageService, contextService, viewDescriptorService);
|
|
33
|
-
this.progressService = progressService;
|
|
34
|
-
this.debugService = debugService;
|
|
35
|
-
this.contextViewService = contextViewService;
|
|
36
|
-
this.contextKeyService = contextKeyService;
|
|
37
|
-
this.paneListeners = ( new Map());
|
|
38
|
-
this.stopActionViewItemDisposables = this._register(( new DisposableStore()));
|
|
39
|
-
this._register(this.debugService.onDidChangeState(state => this.onDebugServiceStateChange(state)));
|
|
40
|
-
this._register(this.contextKeyService.onDidChangeContext(e => {
|
|
41
|
-
if (e.affectsSome(( new Set([CONTEXT_DEBUG_UX_KEY, 'inDebugMode'])))) {
|
|
42
|
-
this.updateTitleArea();
|
|
43
|
-
}
|
|
44
|
-
}));
|
|
45
|
-
this._register(this.contextService.onDidChangeWorkbenchState(() => this.updateTitleArea()));
|
|
46
|
-
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
47
|
-
if (e.affectsConfiguration('debug.toolBarLocation') || e.affectsConfiguration('debug.hideLauncherWhileDebugging')) {
|
|
48
|
-
this.updateTitleArea();
|
|
49
|
-
}
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
create(parent) {
|
|
53
|
-
super.create(parent);
|
|
54
|
-
parent.classList.add('debug-viewlet');
|
|
55
|
-
}
|
|
56
|
-
focus() {
|
|
57
|
-
super.focus();
|
|
58
|
-
if (this.startDebugActionViewItem) {
|
|
59
|
-
this.startDebugActionViewItem.focus();
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
this.focusView(WelcomeView.ID);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
getActionViewItem(action, options) {
|
|
66
|
-
if (action.id === DEBUG_START_COMMAND_ID) {
|
|
67
|
-
this.startDebugActionViewItem = this.instantiationService.createInstance(StartDebugActionViewItem, null, action, options);
|
|
68
|
-
return this.startDebugActionViewItem;
|
|
69
|
-
}
|
|
70
|
-
if (action.id === FOCUS_SESSION_ID) {
|
|
71
|
-
return ( new FocusSessionActionViewItem(
|
|
72
|
-
action,
|
|
73
|
-
undefined,
|
|
74
|
-
this.debugService,
|
|
75
|
-
this.contextViewService,
|
|
76
|
-
this.configurationService
|
|
77
|
-
));
|
|
78
|
-
}
|
|
79
|
-
if (action.id === STOP_ID || action.id === DISCONNECT_ID) {
|
|
80
|
-
this.stopActionViewItemDisposables.clear();
|
|
81
|
-
const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor, { hoverDelegate: options.hoverDelegate }));
|
|
82
|
-
if (item) {
|
|
83
|
-
return item;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return createActionViewItem(this.instantiationService, action, options);
|
|
87
|
-
}
|
|
88
|
-
focusView(id) {
|
|
89
|
-
const view = this.getView(id);
|
|
90
|
-
if (view) {
|
|
91
|
-
view.focus();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
onDebugServiceStateChange(state) {
|
|
95
|
-
if (this.progressResolve) {
|
|
96
|
-
this.progressResolve();
|
|
97
|
-
this.progressResolve = undefined;
|
|
98
|
-
}
|
|
99
|
-
if (state === 1 ) {
|
|
100
|
-
this.progressService.withProgress({ location: VIEWLET_ID, }, _progress => {
|
|
101
|
-
return ( new Promise(resolve => this.progressResolve = resolve));
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
addPanes(panes) {
|
|
106
|
-
super.addPanes(panes);
|
|
107
|
-
for (const { pane: pane } of panes) {
|
|
108
|
-
if (pane.id === BREAKPOINTS_VIEW_ID) {
|
|
109
|
-
this.breakpointView = pane;
|
|
110
|
-
this.updateBreakpointsMaxSize();
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
this.paneListeners.set(pane.id, pane.onDidChange(() => this.updateBreakpointsMaxSize()));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
removePanes(panes) {
|
|
118
|
-
super.removePanes(panes);
|
|
119
|
-
for (const pane of panes) {
|
|
120
|
-
dispose(this.paneListeners.get(pane.id));
|
|
121
|
-
this.paneListeners.delete(pane.id);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
updateBreakpointsMaxSize() {
|
|
125
|
-
if (this.breakpointView) {
|
|
126
|
-
const allOtherCollapsed = this.panes.every(view => !view.isExpanded() || view === this.breakpointView);
|
|
127
|
-
this.breakpointView.maximumBodySize = allOtherCollapsed ? Number.POSITIVE_INFINITY : this.breakpointView.minimumBodySize;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
DebugViewPaneContainer = ( __decorate([
|
|
132
|
-
( __param(0, IWorkbenchLayoutService)),
|
|
133
|
-
( __param(1, ITelemetryService)),
|
|
134
|
-
( __param(2, IProgressService)),
|
|
135
|
-
( __param(3, IDebugService)),
|
|
136
|
-
( __param(4, IInstantiationService)),
|
|
137
|
-
( __param(5, IWorkspaceContextService)),
|
|
138
|
-
( __param(6, IStorageService)),
|
|
139
|
-
( __param(7, IThemeService)),
|
|
140
|
-
( __param(8, IContextMenuService)),
|
|
141
|
-
( __param(9, IExtensionService)),
|
|
142
|
-
( __param(10, IConfigurationService)),
|
|
143
|
-
( __param(11, IContextViewService)),
|
|
144
|
-
( __param(12, IContextKeyService)),
|
|
145
|
-
( __param(13, IViewDescriptorService))
|
|
146
|
-
], DebugViewPaneContainer));
|
|
147
|
-
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
148
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_UX.notEqualsTo('simple')), ( WorkbenchStateContext.notEqualsTo('empty')), ( ContextKeyExpr.or(( CONTEXT_DEBUG_STATE.isEqualTo('inactive')), ( ContextKeyExpr.notEquals('config.debug.toolBarLocation', 'docked')))), ( ContextKeyExpr.or(
|
|
149
|
-
ContextKeyExpr.not('config.debug.hideLauncherWhileDebugging'),
|
|
150
|
-
ContextKeyExpr.not('inDebugMode')
|
|
151
|
-
)))),
|
|
152
|
-
order: 10,
|
|
153
|
-
group: 'navigation',
|
|
154
|
-
command: {
|
|
155
|
-
precondition: ( CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 ))),
|
|
156
|
-
id: DEBUG_START_COMMAND_ID,
|
|
157
|
-
title: DEBUG_START_LABEL
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
registerAction2(class extends Action2 {
|
|
161
|
-
constructor() {
|
|
162
|
-
super({
|
|
163
|
-
id: DEBUG_CONFIGURE_COMMAND_ID,
|
|
164
|
-
title: {
|
|
165
|
-
value: DEBUG_CONFIGURE_LABEL,
|
|
166
|
-
original: 'Open \'launch.json\'',
|
|
167
|
-
mnemonicTitle: ( localizeWithPath(
|
|
168
|
-
'vs/workbench/contrib/debug/browser/debugViewlet',
|
|
169
|
-
{ key: 'miOpenConfigurations', comment: ['&& denotes a mnemonic'] },
|
|
170
|
-
"Open &&Configurations"
|
|
171
|
-
))
|
|
172
|
-
},
|
|
173
|
-
f1: true,
|
|
174
|
-
icon: debugConfigure,
|
|
175
|
-
precondition: ( CONTEXT_DEBUG_UX.notEqualsTo('simple')),
|
|
176
|
-
menu: [{
|
|
177
|
-
id: MenuId.ViewContainerTitle,
|
|
178
|
-
group: 'navigation',
|
|
179
|
-
order: 20,
|
|
180
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_UX.notEqualsTo('simple')), ( WorkbenchStateContext.notEqualsTo('empty')), ( ContextKeyExpr.or(( CONTEXT_DEBUG_STATE.isEqualTo('inactive')), ( ContextKeyExpr.notEquals('config.debug.toolBarLocation', 'docked'))))))
|
|
181
|
-
}, {
|
|
182
|
-
id: MenuId.ViewContainerTitle,
|
|
183
|
-
order: 20,
|
|
184
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked'))))
|
|
185
|
-
}, {
|
|
186
|
-
id: MenuId.MenubarDebugMenu,
|
|
187
|
-
group: '2_configuration',
|
|
188
|
-
order: 1,
|
|
189
|
-
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
190
|
-
}]
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
async run(accessor) {
|
|
194
|
-
const debugService = accessor.get(IDebugService);
|
|
195
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
196
|
-
const configurationManager = debugService.getConfigurationManager();
|
|
197
|
-
let launch;
|
|
198
|
-
if (configurationManager.selectedConfiguration.name) {
|
|
199
|
-
launch = configurationManager.selectedConfiguration.launch;
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
const launches = configurationManager.getLaunches().filter(l => !l.hidden);
|
|
203
|
-
if (launches.length === 1) {
|
|
204
|
-
launch = launches[0];
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
const picks = ( launches.map(l => ({ label: l.name, launch: l })));
|
|
208
|
-
const picked = await quickInputService.pick(picks, {
|
|
209
|
-
activeItem: picks[0],
|
|
210
|
-
placeHolder: ( localizeWithPath(
|
|
211
|
-
'vs/workbench/contrib/debug/browser/debugViewlet',
|
|
212
|
-
{ key: 'selectWorkspaceFolder', comment: ['User picks a workspace folder or a workspace configuration file here. Workspace configuration files can contain settings and thus a launch.json configuration can be written into one.'] },
|
|
213
|
-
"Select a workspace folder to create a launch.json file in or add it to the workspace config file"
|
|
214
|
-
))
|
|
215
|
-
});
|
|
216
|
-
if (picked) {
|
|
217
|
-
launch = picked.launch;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
if (launch) {
|
|
222
|
-
await launch.openConfigFile({ preserveFocus: false });
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
registerAction2(class extends Action2 {
|
|
227
|
-
constructor() {
|
|
228
|
-
super({
|
|
229
|
-
id: 'debug.toggleReplIgnoreFocus',
|
|
230
|
-
title: ( localizeWithPath(
|
|
231
|
-
'vs/workbench/contrib/debug/browser/debugViewlet',
|
|
232
|
-
'debugPanel',
|
|
233
|
-
"Debug Console"
|
|
234
|
-
)),
|
|
235
|
-
toggled: ( ContextKeyExpr.has(`view.${REPL_VIEW_ID}.visible`)),
|
|
236
|
-
menu: [{
|
|
237
|
-
id: ViewsSubMenu,
|
|
238
|
-
group: '3_toggleRepl',
|
|
239
|
-
order: 30,
|
|
240
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID))))
|
|
241
|
-
}]
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
async run(accessor) {
|
|
245
|
-
const viewsService = accessor.get(IViewsService);
|
|
246
|
-
if (viewsService.isViewVisible(REPL_VIEW_ID)) {
|
|
247
|
-
viewsService.closeView(REPL_VIEW_ID);
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
await viewsService.openView(REPL_VIEW_ID);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
255
|
-
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked')), ( ContextKeyExpr.has('config.debug.hideLauncherWhileDebugging')))))),
|
|
256
|
-
order: 10,
|
|
257
|
-
command: {
|
|
258
|
-
id: SELECT_AND_START_ID,
|
|
259
|
-
title: ( localizeWithPath(
|
|
260
|
-
'vs/workbench/contrib/debug/browser/debugViewlet',
|
|
261
|
-
'startAdditionalSession',
|
|
262
|
-
"Start Additional Session"
|
|
263
|
-
)),
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
export { DebugViewPaneContainer };
|