@codingame/monaco-vscode-debug-service-override 3.2.3 → 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.
Files changed (60) hide show
  1. package/debug.js +4 -4
  2. package/package.json +2 -2
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
  4. package/external/tslib/tslib.es6.js +0 -11
  5. package/override/vs/platform/dialogs/common/dialogs.js +0 -8
  6. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +0 -73
  7. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +0 -1011
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +0 -970
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +0 -324
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +0 -432
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -1039
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +0 -649
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +0 -64
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +0 -636
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +0 -725
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +0 -398
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +0 -206
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +0 -80
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +0 -169
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +0 -1271
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +0 -1305
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -115
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +0 -77
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +0 -307
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +0 -31
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +0 -378
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +0 -267
  29. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +0 -808
  30. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +0 -121
  31. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +0 -141
  32. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +0 -262
  33. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +0 -669
  34. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +0 -6
  35. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +0 -6
  36. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +0 -6
  37. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +0 -6
  38. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +0 -6
  39. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +0 -6
  40. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +0 -709
  41. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +0 -992
  42. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +0 -48
  43. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +0 -348
  44. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +0 -119
  45. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +0 -763
  46. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +0 -501
  47. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +0 -162
  48. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +0 -21
  49. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +0 -17
  50. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +0 -110
  51. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +0 -62
  52. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +0 -460
  53. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +0 -162
  54. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +0 -36
  55. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +0 -148
  56. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +0 -289
  57. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -87
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +0 -64
  59. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +0 -311
  60. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +0 -28
@@ -1,378 +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 { widgetShadow, widgetBorder } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
23
- import { Themable, IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
24
- import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
25
- import { FocusSessionActionViewItem } from './debugActionViewItems.js';
26
- import { debugToolBarBackground, debugToolBarBorder } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugColors';
27
- 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';
28
- import { debugContinue, debugPause, debugDisconnect, debugStop, debugStepOver, debugStepInto, debugStepOut, debugStepBack, debugReverseContinue, debugGripper, debugRestart } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
29
- 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';
30
- import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
31
- import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
32
- import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
33
- import { clamp } from 'vscode/vscode/vs/base/common/numbers';
34
- import { PixelRatio } from 'vscode/vscode/vs/base/browser/pixelRatio';
35
-
36
- const DEBUG_TOOLBAR_POSITION_KEY = 'debug.actionswidgetposition';
37
- const DEBUG_TOOLBAR_Y_KEY = 'debug.actionswidgety';
38
- let DebugToolBar = class DebugToolBar extends Themable {
39
- constructor(notificationService, telemetryService, debugService, layoutService, storageService, configurationService, themeService, instantiationService, menuService, contextKeyService) {
40
- super(themeService);
41
- this.notificationService = notificationService;
42
- this.telemetryService = telemetryService;
43
- this.debugService = debugService;
44
- this.layoutService = layoutService;
45
- this.storageService = storageService;
46
- this.configurationService = configurationService;
47
- this.instantiationService = instantiationService;
48
- this.yCoordinate = 0;
49
- this.isVisible = false;
50
- this.isBuilt = false;
51
- this.stopActionViewItemDisposables = this._register(( new DisposableStore()));
52
- this.auxWindowCoordinates = ( new WeakMap());
53
- this.trackPixelRatioListener = this._register(( new MutableDisposable()));
54
- this.$el = $('div.debug-toolbar');
55
- this.$el.style.top = `${layoutService.mainContainerOffset.top}px`;
56
- this.dragArea = append(this.$el, $('div.drag-area' + ThemeIcon.asCSSSelector(debugGripper)));
57
- const actionBarContainer = append(this.$el, $('div.action-bar-container'));
58
- this.debugToolBarMenu = menuService.createMenu(MenuId.DebugToolBar, contextKeyService);
59
- this._register(this.debugToolBarMenu);
60
- this.activeActions = [];
61
- this.actionBar = this._register(( new ActionBar(actionBarContainer, {
62
- orientation: 0 ,
63
- actionViewItemProvider: (action, options) => {
64
- if (action.id === FOCUS_SESSION_ID) {
65
- return this.instantiationService.createInstance(FocusSessionActionViewItem, action, undefined);
66
- }
67
- else if (action.id === STOP_ID || action.id === DISCONNECT_ID) {
68
- this.stopActionViewItemDisposables.clear();
69
- const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor, { hoverDelegate: options.hoverDelegate }));
70
- if (item) {
71
- return item;
72
- }
73
- }
74
- return createActionViewItem(this.instantiationService, action, options);
75
- }
76
- })));
77
- this.updateScheduler = this._register(( new RunOnceScheduler(() => {
78
- const state = this.debugService.state;
79
- const toolBarLocation = this.configurationService.getValue('debug').toolBarLocation;
80
- if (state === 0 ||
81
- toolBarLocation !== 'floating' ||
82
- this.debugService.getModel().getSessions().every(s => s.suppressDebugToolbar) ||
83
- (state === 1 && this.debugService.initializingOptions?.suppressDebugToolbar)) {
84
- return this.hide();
85
- }
86
- const actions = [];
87
- createAndFillInActionBarActions(this.debugToolBarMenu, { shouldForwardArgs: true }, actions);
88
- if (!equals(actions, this.activeActions, (first, second) => first.id === second.id && first.enabled === second.enabled)) {
89
- this.actionBar.clear();
90
- this.actionBar.push(actions, { icon: true, label: false });
91
- this.activeActions = actions;
92
- }
93
- this.show();
94
- }, 20)));
95
- this.updateStyles();
96
- this.registerListeners();
97
- this.hide();
98
- }
99
- registerListeners() {
100
- this._register(this.debugService.onDidChangeState(() => this.updateScheduler.schedule()));
101
- this._register(this.configurationService.onDidChangeConfiguration(e => {
102
- if (e.affectsConfiguration('debug.toolBarLocation')) {
103
- this.updateScheduler.schedule();
104
- }
105
- if (e.affectsConfiguration("workbench.editor.showTabs" ) || e.affectsConfiguration("window.commandCenter" )) {
106
- this._yRange = undefined;
107
- this.setYCoordinate();
108
- }
109
- }));
110
- this._register(this.debugToolBarMenu.onDidChange(() => this.updateScheduler.schedule()));
111
- this._register(this.actionBar.actionRunner.onDidRun((e) => {
112
- if (e.error && !isCancellationError(e.error)) {
113
- this.notificationService.warn(e.error);
114
- }
115
- this.telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: 'debugActionsWidget' });
116
- }));
117
- this._register(addDisposableGenericMouseUpListener(this.dragArea, (event) => {
118
- const mouseClickEvent = ( new StandardMouseEvent(getWindow(this.dragArea), event));
119
- const activeWindow = getWindow(this.layoutService.activeContainer);
120
- if (mouseClickEvent.detail === 2) {
121
- const widgetWidth = this.$el.clientWidth;
122
- this.setCoordinates(0.5 * activeWindow.innerWidth - 0.5 * widgetWidth, this.yDefault);
123
- this.storePosition();
124
- }
125
- }));
126
- this._register(addDisposableGenericMouseDownListener(this.dragArea, (event) => {
127
- this.dragArea.classList.add('dragged');
128
- getWindow(this.layoutService.activeContainer);
129
- }));
130
- this._register(this.layoutService.onDidChangePartVisibility(() => this.setYCoordinate()));
131
- const resizeListener = this._register(( new MutableDisposable()));
132
- this._register(this.layoutService.onDidChangeActiveContainer(() => {
133
- this._yRange = undefined;
134
- this.layoutService.whenActiveContainerStylesLoaded.then(() => {
135
- if (this.isBuilt) {
136
- this.doShowInActiveContainer();
137
- this.setCoordinates();
138
- }
139
- resizeListener.value = this._register(addDisposableListener(getWindow(this.layoutService.activeContainer), EventType.RESIZE, () => this.setYCoordinate()));
140
- });
141
- }));
142
- }
143
- storePosition() {
144
- const activeWindow = getWindow(this.layoutService.activeContainer);
145
- const isMainWindow = this.layoutService.activeContainer === this.layoutService.mainContainer;
146
- const left = this.$el.getBoundingClientRect().left / activeWindow.innerWidth;
147
- if (isMainWindow) {
148
- this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, left, 0 , 1 );
149
- this.storageService.store(DEBUG_TOOLBAR_Y_KEY, this.yCoordinate, 0 , 1 );
150
- }
151
- else {
152
- this.auxWindowCoordinates.set(activeWindow, { x: left, y: this.yCoordinate });
153
- }
154
- }
155
- updateStyles() {
156
- super.updateStyles();
157
- if (this.$el) {
158
- this.$el.style.backgroundColor = this.getColor(debugToolBarBackground) || '';
159
- const widgetShadowColor = this.getColor(widgetShadow);
160
- this.$el.style.boxShadow = widgetShadowColor ? `0 0 8px 2px ${widgetShadowColor}` : '';
161
- const contrastBorderColor = this.getColor(widgetBorder);
162
- const borderColor = this.getColor(debugToolBarBorder);
163
- if (contrastBorderColor) {
164
- this.$el.style.border = `1px solid ${contrastBorderColor}`;
165
- }
166
- else {
167
- this.$el.style.border = borderColor ? `solid ${borderColor}` : 'none';
168
- this.$el.style.border = '1px 0';
169
- }
170
- }
171
- }
172
- setCoordinates(x, y) {
173
- if (!this.isVisible) {
174
- return;
175
- }
176
- const widgetWidth = this.$el.clientWidth;
177
- const currentWindow = getWindow(this.layoutService.activeContainer);
178
- const isMainWindow = currentWindow === mainWindow;
179
- if (x === undefined) {
180
- const positionPercentage = isMainWindow
181
- ? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, 0 ))
182
- : this.auxWindowCoordinates.get(currentWindow)?.x;
183
- x = positionPercentage !== undefined && !isNaN(positionPercentage)
184
- ? positionPercentage * currentWindow.innerWidth
185
- : (0.5 * currentWindow.innerWidth - 0.5 * widgetWidth);
186
- }
187
- x = clamp(x, 0, currentWindow.innerWidth - widgetWidth);
188
- this.$el.style.left = `${x}px`;
189
- if (y === undefined) {
190
- y = isMainWindow
191
- ? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, 0 )
192
- : this.auxWindowCoordinates.get(currentWindow)?.y;
193
- }
194
- this.setYCoordinate(y ?? this.yDefault);
195
- }
196
- setYCoordinate(y = this.yCoordinate) {
197
- const [yMin, yMax] = this.yRange;
198
- y = Math.max(yMin, Math.min(y, yMax));
199
- this.$el.style.top = `${y}px`;
200
- this.yCoordinate = y;
201
- }
202
- get yDefault() {
203
- return this.layoutService.mainContainerOffset.top;
204
- }
205
- get yRange() {
206
- if (!this._yRange) {
207
- const isTitleBarVisible = this.layoutService.isVisible("workbench.parts.titlebar" , getWindow(this.layoutService.activeContainer));
208
- const yMin = isTitleBarVisible ? 0 : this.layoutService.mainContainerOffset.top;
209
- let yMax = 0;
210
- if (isTitleBarVisible) {
211
- if (this.configurationService.getValue("window.commandCenter" ) === true) {
212
- yMax += 35;
213
- }
214
- else {
215
- yMax += 28;
216
- }
217
- }
218
- if (this.configurationService.getValue("workbench.editor.showTabs" ) !== "none" ) {
219
- yMax += 35;
220
- }
221
- this._yRange = [yMin, yMax];
222
- }
223
- return this._yRange;
224
- }
225
- show() {
226
- if (this.isVisible) {
227
- this.setCoordinates();
228
- return;
229
- }
230
- if (!this.isBuilt) {
231
- this.isBuilt = true;
232
- this.doShowInActiveContainer();
233
- }
234
- this.isVisible = true;
235
- show(this.$el);
236
- this.setCoordinates();
237
- }
238
- doShowInActiveContainer() {
239
- this.layoutService.activeContainer.appendChild(this.$el);
240
- this.trackPixelRatioListener.value = PixelRatio.getInstance(getWindow(this.$el)).onDidChange(() => this.setYCoordinate());
241
- }
242
- hide() {
243
- this.isVisible = false;
244
- hide(this.$el);
245
- }
246
- dispose() {
247
- super.dispose();
248
- this.$el?.remove();
249
- }
250
- };
251
- DebugToolBar = ( __decorate([
252
- ( __param(0, INotificationService)),
253
- ( __param(1, ITelemetryService)),
254
- ( __param(2, IDebugService)),
255
- ( __param(3, IWorkbenchLayoutService)),
256
- ( __param(4, IStorageService)),
257
- ( __param(5, IConfigurationService)),
258
- ( __param(6, IThemeService)),
259
- ( __param(7, IInstantiationService)),
260
- ( __param(8, IMenuService)),
261
- ( __param(9, IContextKeyService))
262
- ], DebugToolBar));
263
- function createDisconnectMenuItemAction(action, disposables, accessor, options) {
264
- const menuService = accessor.get(IMenuService);
265
- const contextKeyService = accessor.get(IContextKeyService);
266
- const instantiationService = accessor.get(IInstantiationService);
267
- const contextMenuService = accessor.get(IContextMenuService);
268
- const menu = menuService.createMenu(MenuId.DebugToolBarStop, contextKeyService);
269
- const secondary = [];
270
- createAndFillInActionBarActions(menu, { shouldForwardArgs: true }, secondary);
271
- if (!secondary.length) {
272
- return undefined;
273
- }
274
- const dropdownAction = disposables.add(( new Action('notebook.moreRunActions', ( localizeWithPath(
275
- 'vs/workbench/contrib/debug/browser/debugToolBar',
276
- 'notebook.moreRunActionsLabel',
277
- "More..."
278
- )), 'codicon-chevron-down', true)));
279
- const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, secondary, 'debug-stop-actions', contextMenuService, options);
280
- return item;
281
- }
282
- const debugViewTitleItems = [];
283
- const registerDebugToolBarItem = (id, title, order, icon, when, precondition, alt) => {
284
- MenuRegistry.appendMenuItem(MenuId.DebugToolBar, {
285
- group: 'navigation',
286
- when,
287
- order,
288
- command: {
289
- id,
290
- title,
291
- icon,
292
- precondition
293
- },
294
- alt
295
- });
296
- debugViewTitleItems.push(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
297
- group: 'navigation',
298
- when: ( ContextKeyExpr.and(when, ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked')))),
299
- order,
300
- command: {
301
- id,
302
- title,
303
- icon,
304
- precondition
305
- }
306
- }));
307
- };
308
- MenuRegistry.onDidChangeMenu(e => {
309
- if (( e.has(MenuId.DebugToolBar))) {
310
- dispose(debugViewTitleItems);
311
- const items = MenuRegistry.getMenuItems(MenuId.DebugToolBar);
312
- for (const i of items) {
313
- debugViewTitleItems.push(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
314
- ...i,
315
- when: ( ContextKeyExpr.and(i.when, ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked'))))
316
- }));
317
- }
318
- }
319
- });
320
- const CONTEXT_TOOLBAR_COMMAND_CENTER = ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'commandCenter'));
321
- MenuRegistry.appendMenuItem(MenuId.CommandCenterCenter, {
322
- submenu: MenuId.DebugToolBar,
323
- title: 'Debug',
324
- icon: Codicon.debug,
325
- order: 1,
326
- when: ( ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_TOOLBAR_COMMAND_CENTER))
327
- });
328
- registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, debugContinue, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
329
- 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()))));
330
- 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)), });
331
- 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)), });
332
- registerDebugToolBarItem(STEP_OVER_ID, STEP_OVER_LABEL, 20, debugStepOver, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
333
- registerDebugToolBarItem(STEP_INTO_ID, STEP_INTO_LABEL, 30, debugStepInto, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
334
- registerDebugToolBarItem(STEP_OUT_ID, STEP_OUT_LABEL, 40, debugStepOut, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
335
- registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, 60, debugRestart);
336
- registerDebugToolBarItem(STEP_BACK_ID, ( localizeWithPath(
337
- 'vs/workbench/contrib/debug/browser/debugToolBar',
338
- 'stepBackDebug',
339
- "Step Back"
340
- )), 50, debugStepBack, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
341
- registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localizeWithPath(
342
- 'vs/workbench/contrib/debug/browser/debugToolBar',
343
- 'reverseContinue',
344
- "Reverse"
345
- )), 55, debugReverseContinue, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
346
- registerDebugToolBarItem(FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, 100, Codicon.listTree, ( ContextKeyExpr.and(CONTEXT_MULTI_SESSION_DEBUG, ( CONTEXT_TOOLBAR_COMMAND_CENTER.negate()))));
347
- MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
348
- group: 'navigation',
349
- when: ( ContextKeyExpr.and(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
350
- order: 0,
351
- command: {
352
- id: DISCONNECT_ID,
353
- title: DISCONNECT_LABEL,
354
- icon: debugDisconnect
355
- }
356
- });
357
- MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
358
- group: 'navigation',
359
- when: ( ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
360
- order: 0,
361
- command: {
362
- id: STOP_ID,
363
- title: STOP_LABEL,
364
- icon: debugStop
365
- }
366
- });
367
- MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
368
- group: 'navigation',
369
- 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)))),
370
- order: 0,
371
- command: {
372
- id: DISCONNECT_AND_SUSPEND_ID,
373
- title: DISCONNECT_AND_SUSPEND_LABEL,
374
- icon: debugDisconnect
375
- }
376
- });
377
-
378
- 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 };