@codingame/monaco-vscode-debug-service-override 25.1.2 → 26.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/package.json +2 -2
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +41 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +379 -255
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +606 -325
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +132 -91
- package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +105 -103
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +258 -147
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +163 -121
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +92 -41
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +68 -39
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +290 -214
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +409 -260
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +14 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +19 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +126 -100
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +160 -89
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +87 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +270 -181
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +79 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +149 -113
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css +24 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +201 -189
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +28 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +10 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +66 -86
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +24 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +177 -138
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +55 -33
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +8 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +23 -19
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +9 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +156 -133
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +81 -52
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +22 -14
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +46 -30
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +74 -52
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +7 -7
|
@@ -52,10 +52,21 @@ import { debugGripper, debugContinue, debugPause, debugStop, debugDisconnect, de
|
|
|
52
52
|
import * as debugToolBar from './media/debugToolBar.css';
|
|
53
53
|
|
|
54
54
|
registerCss(debugToolBar);
|
|
55
|
-
const DEBUG_TOOLBAR_POSITION_KEY =
|
|
56
|
-
const DEBUG_TOOLBAR_Y_KEY =
|
|
55
|
+
const DEBUG_TOOLBAR_POSITION_KEY = "debug.actionswidgetposition";
|
|
56
|
+
const DEBUG_TOOLBAR_Y_KEY = "debug.actionswidgety";
|
|
57
57
|
let DebugToolBar = class DebugToolBar extends Themable {
|
|
58
|
-
constructor(
|
|
58
|
+
constructor(
|
|
59
|
+
notificationService,
|
|
60
|
+
telemetryService,
|
|
61
|
+
debugService,
|
|
62
|
+
layoutService,
|
|
63
|
+
storageService,
|
|
64
|
+
configurationService,
|
|
65
|
+
themeService,
|
|
66
|
+
instantiationService,
|
|
67
|
+
menuService,
|
|
68
|
+
contextKeyService
|
|
69
|
+
) {
|
|
59
70
|
super(themeService);
|
|
60
71
|
this.notificationService = notificationService;
|
|
61
72
|
this.telemetryService = telemetryService;
|
|
@@ -69,19 +80,22 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
69
80
|
this.stopActionViewItemDisposables = this._register(( new DisposableStore()));
|
|
70
81
|
this.auxWindowCoordinates = ( new WeakMap());
|
|
71
82
|
this.trackPixelRatioListener = this._register(( new MutableDisposable()));
|
|
72
|
-
this.$el = $(
|
|
83
|
+
this.$el = $("div.debug-toolbar");
|
|
73
84
|
const controlsOnTitlebar = getTitleBarStyle(this.configurationService) === TitlebarStyle.CUSTOM;
|
|
74
85
|
const controlsOnLeft = controlsOnTitlebar && platform === Platform.Mac;
|
|
75
86
|
const controlsOnRight = controlsOnTitlebar && (platform === Platform.Windows || platform === Platform.Linux);
|
|
76
87
|
this.$el.style.transform = `translate(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.dragArea = append(
|
|
84
|
-
|
|
88
|
+
min(
|
|
89
|
+
max(${controlsOnLeft ? "60px" : "0px"}, calc(-50% + (100vw * var(--x-position)))),
|
|
90
|
+
calc(100vw - 100% - ${controlsOnRight ? "100px" : "0px"})
|
|
91
|
+
),
|
|
92
|
+
var(--y-position)
|
|
93
|
+
)`;
|
|
94
|
+
this.dragArea = append(
|
|
95
|
+
this.$el,
|
|
96
|
+
$("div.drag-area" + ThemeIcon.asCSSSelector(debugGripper))
|
|
97
|
+
);
|
|
98
|
+
const actionBarContainer = append(this.$el, $("div.action-bar-container"));
|
|
85
99
|
this.debugToolBarMenu = menuService.createMenu(MenuId.DebugToolBar, contextKeyService);
|
|
86
100
|
this._register(this.debugToolBarMenu);
|
|
87
101
|
this.activeActions = [];
|
|
@@ -90,10 +104,13 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
90
104
|
actionViewItemProvider: (action, options) => {
|
|
91
105
|
if (action.id === FOCUS_SESSION_ID) {
|
|
92
106
|
return this.instantiationService.createInstance(FocusSessionActionViewItem, action, undefined);
|
|
93
|
-
}
|
|
94
|
-
else if (action.id === STOP_ID || action.id === DISCONNECT_ID) {
|
|
107
|
+
} else if (action.id === STOP_ID || action.id === DISCONNECT_ID) {
|
|
95
108
|
this.stopActionViewItemDisposables.clear();
|
|
96
|
-
const item = this.instantiationService.invokeFunction(
|
|
109
|
+
const item = this.instantiationService.invokeFunction(
|
|
110
|
+
accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor, {
|
|
111
|
+
hoverDelegate: options.hoverDelegate
|
|
112
|
+
})
|
|
113
|
+
);
|
|
97
114
|
if (item) {
|
|
98
115
|
return item;
|
|
99
116
|
}
|
|
@@ -103,17 +120,23 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
103
120
|
})));
|
|
104
121
|
this.updateScheduler = this._register(( new RunOnceScheduler(() => {
|
|
105
122
|
const state = this.debugService.state;
|
|
106
|
-
const toolBarLocation = this.configurationService.getValue(
|
|
107
|
-
if (state === State.Inactive ||
|
|
108
|
-
toolBarLocation !== 'floating' ||
|
|
109
|
-
this.debugService.getModel().getSessions().every(s => s.suppressDebugToolbar) ||
|
|
110
|
-
(state === State.Initializing && this.debugService.initializingOptions?.suppressDebugToolbar)) {
|
|
123
|
+
const toolBarLocation = this.configurationService.getValue("debug").toolBarLocation;
|
|
124
|
+
if (state === State.Inactive || toolBarLocation !== "floating" || this.debugService.getModel().getSessions().every(s => s.suppressDebugToolbar) || (state === State.Initializing && this.debugService.initializingOptions?.suppressDebugToolbar)) {
|
|
111
125
|
return this.hide();
|
|
112
126
|
}
|
|
113
|
-
const actions = getFlatActionBarActions(this.debugToolBarMenu.getActions({
|
|
114
|
-
|
|
127
|
+
const actions = getFlatActionBarActions(this.debugToolBarMenu.getActions({
|
|
128
|
+
shouldForwardArgs: true
|
|
129
|
+
}));
|
|
130
|
+
if (!equals(
|
|
131
|
+
actions,
|
|
132
|
+
this.activeActions,
|
|
133
|
+
(first, second) => first.id === second.id && first.enabled === second.enabled
|
|
134
|
+
)) {
|
|
115
135
|
this.actionBar.clear();
|
|
116
|
-
this.actionBar.push(actions, {
|
|
136
|
+
this.actionBar.push(actions, {
|
|
137
|
+
icon: true,
|
|
138
|
+
label: false
|
|
139
|
+
});
|
|
117
140
|
this.activeActions = actions;
|
|
118
141
|
}
|
|
119
142
|
this.show();
|
|
@@ -125,7 +148,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
125
148
|
registerListeners() {
|
|
126
149
|
this._register(this.debugService.onDidChangeState(() => this.updateScheduler.schedule()));
|
|
127
150
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
128
|
-
if (e.affectsConfiguration(
|
|
151
|
+
if (e.affectsConfiguration("debug.toolBarLocation")) {
|
|
129
152
|
this.updateScheduler.schedule();
|
|
130
153
|
}
|
|
131
154
|
if (e.affectsConfiguration(LayoutSettings.EDITOR_TABS_MODE) || e.affectsConfiguration(LayoutSettings.COMMAND_CENTER)) {
|
|
@@ -134,33 +157,39 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
134
157
|
}
|
|
135
158
|
}));
|
|
136
159
|
this._register(this.debugToolBarMenu.onDidChange(() => this.updateScheduler.schedule()));
|
|
137
|
-
this._register(this.actionBar.actionRunner.onDidRun(
|
|
160
|
+
this._register(this.actionBar.actionRunner.onDidRun(e => {
|
|
138
161
|
if (e.error && !isCancellationError(e.error)) {
|
|
139
162
|
this.notificationService.warn(e.error);
|
|
140
163
|
}
|
|
141
|
-
this.telemetryService.publicLog2(
|
|
164
|
+
this.telemetryService.publicLog2("workbenchActionExecuted", {
|
|
165
|
+
id: e.action.id,
|
|
166
|
+
from: "debugActionsWidget"
|
|
167
|
+
});
|
|
142
168
|
}));
|
|
143
|
-
this._register(addDisposableGenericMouseUpListener(this.dragArea,
|
|
169
|
+
this._register(addDisposableGenericMouseUpListener(this.dragArea, event => {
|
|
144
170
|
const mouseClickEvent = ( new StandardMouseEvent(getWindow(this.dragArea), event));
|
|
145
171
|
if (mouseClickEvent.detail === 2) {
|
|
146
172
|
this.setCoordinates(0.5, this.yDefault);
|
|
147
173
|
this.storePosition();
|
|
148
174
|
}
|
|
149
175
|
}));
|
|
150
|
-
this._register(addDisposableGenericMouseDownListener(this.dragArea,
|
|
151
|
-
this.dragArea.classList.add(
|
|
176
|
+
this._register(addDisposableGenericMouseDownListener(this.dragArea, e => {
|
|
177
|
+
this.dragArea.classList.add("dragged");
|
|
152
178
|
const activeWindow = getWindow(this.layoutService.activeContainer);
|
|
153
179
|
const originEvent = ( new StandardMouseEvent(activeWindow, e));
|
|
154
180
|
const originX = this.computeCurrentXPercent();
|
|
155
181
|
const originY = this.getCurrentYPosition();
|
|
156
|
-
const mouseMoveListener = addDisposableGenericMouseMoveListener(activeWindow,
|
|
182
|
+
const mouseMoveListener = addDisposableGenericMouseMoveListener(activeWindow, e => {
|
|
157
183
|
const mouseMoveEvent = ( new StandardMouseEvent(activeWindow, e));
|
|
158
184
|
mouseMoveEvent.preventDefault();
|
|
159
|
-
this.setCoordinates(
|
|
185
|
+
this.setCoordinates(
|
|
186
|
+
originX + (mouseMoveEvent.posx - originEvent.posx) / activeWindow.innerWidth,
|
|
187
|
+
originY + mouseMoveEvent.posy - originEvent.posy
|
|
188
|
+
);
|
|
160
189
|
});
|
|
161
|
-
const mouseUpListener = addDisposableGenericMouseUpListener(activeWindow,
|
|
190
|
+
const mouseUpListener = addDisposableGenericMouseUpListener(activeWindow, e => {
|
|
162
191
|
this.storePosition();
|
|
163
|
-
this.dragArea.classList.remove(
|
|
192
|
+
this.dragArea.classList.remove("dragged");
|
|
164
193
|
mouseMoveListener.dispose();
|
|
165
194
|
mouseUpListener.dispose();
|
|
166
195
|
});
|
|
@@ -176,14 +205,17 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
176
205
|
}));
|
|
177
206
|
}
|
|
178
207
|
computeCurrentXPercent() {
|
|
179
|
-
const {
|
|
208
|
+
const {
|
|
209
|
+
left,
|
|
210
|
+
width
|
|
211
|
+
} = this.$el.getBoundingClientRect();
|
|
180
212
|
return (left + width / 2) / getWindow(this.$el).innerWidth;
|
|
181
213
|
}
|
|
182
214
|
getCurrentXPercent() {
|
|
183
|
-
return Number(this.$el.style.getPropertyValue(
|
|
215
|
+
return Number(this.$el.style.getPropertyValue("--x-position"));
|
|
184
216
|
}
|
|
185
217
|
getCurrentYPosition() {
|
|
186
|
-
return parseInt(this.$el.style.getPropertyValue(
|
|
218
|
+
return parseInt(this.$el.style.getPropertyValue("--y-position"));
|
|
187
219
|
}
|
|
188
220
|
storePosition() {
|
|
189
221
|
const activeWindow = getWindow(this.layoutService.activeContainer);
|
|
@@ -193,42 +225,39 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
193
225
|
if (isMainWindow) {
|
|
194
226
|
this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, x, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
195
227
|
this.storageService.store(DEBUG_TOOLBAR_Y_KEY, y, StorageScope.PROFILE, StorageTarget.MACHINE);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
228
|
+
} else {
|
|
229
|
+
this.auxWindowCoordinates.set(activeWindow, {
|
|
230
|
+
x,
|
|
231
|
+
y
|
|
232
|
+
});
|
|
199
233
|
}
|
|
200
234
|
}
|
|
201
235
|
updateStyles() {
|
|
202
236
|
super.updateStyles();
|
|
203
237
|
if (this.$el) {
|
|
204
|
-
this.$el.style.backgroundColor = this.getColor(debugToolBarBackground) ||
|
|
238
|
+
this.$el.style.backgroundColor = this.getColor(debugToolBarBackground) || "";
|
|
205
239
|
const widgetShadowColor = this.getColor(widgetShadow);
|
|
206
|
-
this.$el.style.boxShadow = widgetShadowColor ? `0 0 8px 2px ${widgetShadowColor}` :
|
|
240
|
+
this.$el.style.boxShadow = widgetShadowColor ? `0 0 8px 2px ${widgetShadowColor}` : "";
|
|
207
241
|
const contrastBorderColor = this.getColor(widgetBorder);
|
|
208
242
|
const borderColor = this.getColor(debugToolBarBorder);
|
|
209
243
|
if (contrastBorderColor) {
|
|
210
244
|
this.$el.style.border = `1px solid ${contrastBorderColor}`;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
this.$el.style.border =
|
|
214
|
-
this.$el.style.border = '1px 0';
|
|
245
|
+
} else {
|
|
246
|
+
this.$el.style.border = borderColor ? `solid ${borderColor}` : "none";
|
|
247
|
+
this.$el.style.border = "1px 0";
|
|
215
248
|
}
|
|
216
249
|
}
|
|
217
250
|
}
|
|
218
251
|
getStoredXPosition() {
|
|
219
252
|
const currentWindow = getWindow(this.layoutService.activeContainer);
|
|
220
253
|
const isMainWindow = currentWindow === mainWindow;
|
|
221
|
-
const storedPercentage = isMainWindow
|
|
222
|
-
? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, StorageScope.PROFILE))
|
|
223
|
-
: this.auxWindowCoordinates.get(currentWindow)?.x;
|
|
254
|
+
const storedPercentage = isMainWindow ? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, StorageScope.PROFILE)) : this.auxWindowCoordinates.get(currentWindow)?.x;
|
|
224
255
|
return storedPercentage !== undefined && !isNaN(storedPercentage) ? storedPercentage : 0.5;
|
|
225
256
|
}
|
|
226
257
|
getStoredYPosition() {
|
|
227
258
|
const currentWindow = getWindow(this.layoutService.activeContainer);
|
|
228
259
|
const isMainWindow = currentWindow === mainWindow;
|
|
229
|
-
const storedY = isMainWindow
|
|
230
|
-
? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, StorageScope.PROFILE)
|
|
231
|
-
: this.auxWindowCoordinates.get(currentWindow)?.y;
|
|
260
|
+
const storedY = isMainWindow ? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, StorageScope.PROFILE) : this.auxWindowCoordinates.get(currentWindow)?.y;
|
|
232
261
|
return storedY ?? this.yDefault;
|
|
233
262
|
}
|
|
234
263
|
setCoordinates(x, y) {
|
|
@@ -239,8 +268,8 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
239
268
|
y ??= this.getStoredYPosition();
|
|
240
269
|
const [yMin, yMax] = this.yRange;
|
|
241
270
|
y = Math.max(yMin, Math.min(y, yMax));
|
|
242
|
-
this.$el.style.setProperty(
|
|
243
|
-
this.$el.style.setProperty(
|
|
271
|
+
this.$el.style.setProperty("--x-position", `${x}`);
|
|
272
|
+
this.$el.style.setProperty("--y-position", `${y}px`);
|
|
244
273
|
}
|
|
245
274
|
get yDefault() {
|
|
246
275
|
return this.layoutService.mainContainerOffset.top;
|
|
@@ -253,8 +282,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
253
282
|
if (isTitleBarVisible) {
|
|
254
283
|
if (this.configurationService.getValue(LayoutSettings.COMMAND_CENTER) === true) {
|
|
255
284
|
yMax += 35;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
285
|
+
} else {
|
|
258
286
|
yMax += 28;
|
|
259
287
|
}
|
|
260
288
|
}
|
|
@@ -291,35 +319,33 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
291
319
|
this.$el?.remove();
|
|
292
320
|
}
|
|
293
321
|
};
|
|
294
|
-
DebugToolBar = ( __decorate([
|
|
295
|
-
( __param(0, INotificationService)),
|
|
296
|
-
( __param(1, ITelemetryService)),
|
|
297
|
-
( __param(2, IDebugService)),
|
|
298
|
-
( __param(3, IWorkbenchLayoutService)),
|
|
299
|
-
( __param(4, IStorageService)),
|
|
300
|
-
( __param(5, IConfigurationService)),
|
|
301
|
-
( __param(6, IThemeService)),
|
|
302
|
-
( __param(7, IInstantiationService)),
|
|
303
|
-
( __param(8, IMenuService)),
|
|
304
|
-
( __param(9, IContextKeyService))
|
|
305
|
-
], DebugToolBar));
|
|
322
|
+
DebugToolBar = ( __decorate([( __param(0, INotificationService)), ( __param(1, ITelemetryService)), ( __param(2, IDebugService)), ( __param(3, IWorkbenchLayoutService)), ( __param(4, IStorageService)), ( __param(5, IConfigurationService)), ( __param(6, IThemeService)), ( __param(7, IInstantiationService)), ( __param(8, IMenuService)), ( __param(9, IContextKeyService))], DebugToolBar));
|
|
306
323
|
function createDisconnectMenuItemAction(action, disposables, accessor, options) {
|
|
307
324
|
const menuService = accessor.get(IMenuService);
|
|
308
325
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
309
326
|
const instantiationService = accessor.get(IInstantiationService);
|
|
310
|
-
const menu = menuService.getMenuActions(MenuId.DebugToolBarStop, contextKeyService, {
|
|
327
|
+
const menu = menuService.getMenuActions(MenuId.DebugToolBarStop, contextKeyService, {
|
|
328
|
+
shouldForwardArgs: true
|
|
329
|
+
});
|
|
311
330
|
const secondary = getFlatActionBarActions(menu);
|
|
312
331
|
if (!secondary.length) {
|
|
313
332
|
return undefined;
|
|
314
333
|
}
|
|
315
|
-
const dropdownAction = disposables.add(( new Action(
|
|
316
|
-
const item = instantiationService.createInstance(
|
|
334
|
+
const dropdownAction = disposables.add(( new Action("notebook.moreRunActions", ( localize(7236, "More...")), "codicon-chevron-down", true)));
|
|
335
|
+
const item = instantiationService.createInstance(
|
|
336
|
+
DropdownWithPrimaryActionViewItem,
|
|
337
|
+
action,
|
|
338
|
+
dropdownAction,
|
|
339
|
+
secondary,
|
|
340
|
+
"debug-stop-actions",
|
|
341
|
+
options
|
|
342
|
+
);
|
|
317
343
|
return item;
|
|
318
344
|
}
|
|
319
345
|
const debugViewTitleItems = ( new DisposableStore());
|
|
320
346
|
const registerDebugToolBarItem = (id, title, order, icon, when, precondition, alt) => {
|
|
321
347
|
MenuRegistry.appendMenuItem(MenuId.DebugToolBar, {
|
|
322
|
-
group:
|
|
348
|
+
group: "navigation",
|
|
323
349
|
when,
|
|
324
350
|
order,
|
|
325
351
|
command: {
|
|
@@ -331,8 +357,8 @@ const registerDebugToolBarItem = (id, title, order, icon, when, precondition, al
|
|
|
331
357
|
alt
|
|
332
358
|
});
|
|
333
359
|
debugViewTitleItems.add(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
334
|
-
group:
|
|
335
|
-
when: ( ContextKeyExpr.and(when, ( ContextKeyExpr.equals(
|
|
360
|
+
group: "navigation",
|
|
361
|
+
when: ( ContextKeyExpr.and(when, ( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo("inactive")), ( ContextKeyExpr.equals("config.debug.toolBarLocation", "docked")))),
|
|
336
362
|
order,
|
|
337
363
|
command: {
|
|
338
364
|
id,
|
|
@@ -349,32 +375,77 @@ markAsSingleton(MenuRegistry.onDidChangeMenu(e => {
|
|
|
349
375
|
for (const i of items) {
|
|
350
376
|
debugViewTitleItems.add(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
351
377
|
...i,
|
|
352
|
-
when: ( ContextKeyExpr.and(i.when, ( ContextKeyExpr.equals(
|
|
378
|
+
when: ( ContextKeyExpr.and(i.when, ( ContextKeyExpr.equals("viewContainer", VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo("inactive")), ( ContextKeyExpr.equals("config.debug.toolBarLocation", "docked"))))
|
|
353
379
|
}));
|
|
354
380
|
}
|
|
355
381
|
}
|
|
356
382
|
}));
|
|
357
|
-
const CONTEXT_TOOLBAR_COMMAND_CENTER = ( ContextKeyExpr.equals(
|
|
383
|
+
const CONTEXT_TOOLBAR_COMMAND_CENTER = ( ContextKeyExpr.equals("config.debug.toolBarLocation", "commandCenter"));
|
|
358
384
|
MenuRegistry.appendMenuItem(MenuId.CommandCenterCenter, {
|
|
359
385
|
submenu: MenuId.DebugToolBar,
|
|
360
|
-
title:
|
|
386
|
+
title: "Debug",
|
|
361
387
|
icon: Codicon.debug,
|
|
362
388
|
order: 1,
|
|
363
389
|
when: ( ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_TOOLBAR_COMMAND_CENTER))
|
|
364
390
|
});
|
|
365
|
-
registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, debugContinue, ( CONTEXT_DEBUG_STATE.isEqualTo(
|
|
366
|
-
registerDebugToolBarItem(PAUSE_ID, PAUSE_LABEL, 10, debugPause, ( CONTEXT_DEBUG_STATE.notEqualsTo(
|
|
367
|
-
registerDebugToolBarItem(STOP_ID, STOP_LABEL, 70, debugStop, ( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), undefined, {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
391
|
+
registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, debugContinue, ( CONTEXT_DEBUG_STATE.isEqualTo("stopped")));
|
|
392
|
+
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()))));
|
|
393
|
+
registerDebugToolBarItem(STOP_ID, STOP_LABEL, 70, debugStop, ( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), undefined, {
|
|
394
|
+
id: DISCONNECT_ID,
|
|
395
|
+
title: DISCONNECT_LABEL,
|
|
396
|
+
icon: debugDisconnect,
|
|
397
|
+
precondition: ( ContextKeyExpr.and(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED))
|
|
398
|
+
});
|
|
399
|
+
registerDebugToolBarItem(
|
|
400
|
+
DISCONNECT_ID,
|
|
401
|
+
DISCONNECT_LABEL,
|
|
402
|
+
70,
|
|
403
|
+
debugDisconnect,
|
|
404
|
+
CONTEXT_FOCUSED_SESSION_IS_ATTACH,
|
|
405
|
+
undefined,
|
|
406
|
+
{
|
|
407
|
+
id: STOP_ID,
|
|
408
|
+
title: STOP_LABEL,
|
|
409
|
+
icon: debugStop,
|
|
410
|
+
precondition: ( ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED))
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
registerDebugToolBarItem(
|
|
414
|
+
STEP_OVER_ID,
|
|
415
|
+
STEP_OVER_LABEL,
|
|
416
|
+
20,
|
|
417
|
+
debugStepOver,
|
|
418
|
+
undefined,
|
|
419
|
+
( CONTEXT_DEBUG_STATE.isEqualTo("stopped"))
|
|
420
|
+
);
|
|
421
|
+
registerDebugToolBarItem(
|
|
422
|
+
STEP_INTO_ID,
|
|
423
|
+
STEP_INTO_LABEL,
|
|
424
|
+
30,
|
|
425
|
+
debugStepInto,
|
|
426
|
+
undefined,
|
|
427
|
+
( CONTEXT_DEBUG_STATE.isEqualTo("stopped"))
|
|
428
|
+
);
|
|
429
|
+
registerDebugToolBarItem(
|
|
430
|
+
STEP_OUT_ID,
|
|
431
|
+
STEP_OUT_LABEL,
|
|
432
|
+
40,
|
|
433
|
+
debugStepOut,
|
|
434
|
+
undefined,
|
|
435
|
+
( CONTEXT_DEBUG_STATE.isEqualTo("stopped"))
|
|
436
|
+
);
|
|
372
437
|
registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, 60, debugRestart);
|
|
373
|
-
registerDebugToolBarItem(STEP_BACK_ID, ( localize(
|
|
374
|
-
registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localize(
|
|
375
|
-
registerDebugToolBarItem(
|
|
438
|
+
registerDebugToolBarItem(STEP_BACK_ID, ( localize(7237, "Step Back")), 50, debugStepBack, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo("stopped")));
|
|
439
|
+
registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localize(7238, "Reverse")), 55, debugReverseContinue, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo("stopped")));
|
|
440
|
+
registerDebugToolBarItem(
|
|
441
|
+
FOCUS_SESSION_ID,
|
|
442
|
+
FOCUS_SESSION_LABEL,
|
|
443
|
+
100,
|
|
444
|
+
Codicon.listTree,
|
|
445
|
+
( ContextKeyExpr.and(CONTEXT_MULTI_SESSION_DEBUG, ( CONTEXT_TOOLBAR_COMMAND_CENTER.negate())))
|
|
446
|
+
);
|
|
376
447
|
MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
377
|
-
group:
|
|
448
|
+
group: "navigation",
|
|
378
449
|
when: ( ContextKeyExpr.and(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
|
|
379
450
|
order: 0,
|
|
380
451
|
command: {
|
|
@@ -384,7 +455,7 @@ MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
|
384
455
|
}
|
|
385
456
|
});
|
|
386
457
|
MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
387
|
-
group:
|
|
458
|
+
group: "navigation",
|
|
388
459
|
when: ( ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
|
|
389
460
|
order: 0,
|
|
390
461
|
command: {
|
|
@@ -394,7 +465,7 @@ MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
|
394
465
|
}
|
|
395
466
|
});
|
|
396
467
|
MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
|
|
397
|
-
group:
|
|
468
|
+
group: "navigation",
|
|
398
469
|
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)))),
|
|
399
470
|
order: 0,
|
|
400
471
|
command: {
|