@codingame/monaco-vscode-debug-service-override 2.2.2 → 3.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.
Files changed (34) hide show
  1. package/assets/continue-tb.png +0 -0
  2. package/assets/pause-tb.png +0 -0
  3. package/assets/restart-tb.png +0 -0
  4. package/assets/run-with-debugging-tb.png +0 -0
  5. package/assets/stepinto-tb.png +0 -0
  6. package/assets/stepout-tb.png +0 -0
  7. package/assets/stepover-tb.png +0 -0
  8. package/assets/stop-tb.png +0 -0
  9. package/debug.js +1 -0
  10. package/package.json +2 -2
  11. package/tools/debugAssets.js +4 -0
  12. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +180 -4
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +8 -8
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +112 -50
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +7 -10
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +14 -7
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +2 -4
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +8 -8
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +5 -6
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +14 -10
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +19 -7
  23. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +18 -8
  24. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
  25. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +33 -4
  26. package/vscode/src/vs/workbench/contrib/debug/browser/media/all.png.js +12 -0
  27. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +4 -4
  28. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +130 -18
  29. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +28 -20
  30. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +3 -2
  31. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +48 -4
  32. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +11 -24
  33. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +29 -0
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +64 -0
@@ -1,5 +1,4 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { PixelRatio } from 'vscode/vscode/vs/base/browser/browser';
3
2
  import { $, append, addDisposableGenericMouseUpListener, getWindow, addDisposableGenericMouseDownListener, addDisposableListener, EventType, show, hide } from 'vscode/vscode/vs/base/browser/dom';
4
3
  import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
5
4
  import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
@@ -32,6 +31,7 @@ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/lay
32
31
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
33
32
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
34
33
  import { clamp } from 'vscode/vscode/vs/base/common/numbers';
34
+ import { PixelRatio } from 'vscode/vscode/vs/base/browser/pixelRatio';
35
35
 
36
36
  const DEBUG_TOOLBAR_POSITION_KEY = 'debug.actionswidgetposition';
37
37
  const DEBUG_TOOLBAR_Y_KEY = 'debug.actionswidgety';
@@ -50,6 +50,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
50
50
  this.isBuilt = false;
51
51
  this.stopActionViewItemDisposables = this._register(( new DisposableStore()));
52
52
  this.auxWindowCoordinates = ( new WeakMap());
53
+ this.trackPixelRatioListener = this._register(( new MutableDisposable()));
53
54
  this.$el = $('div.debug-toolbar');
54
55
  this.$el.style.top = `${layoutService.mainContainerOffset.top}px`;
55
56
  this.dragArea = append(this.$el, $('div.drag-area' + ThemeIcon.asCSSSelector(debugGripper)));
@@ -59,18 +60,18 @@ let DebugToolBar = class DebugToolBar extends Themable {
59
60
  this.activeActions = [];
60
61
  this.actionBar = this._register(( new ActionBar(actionBarContainer, {
61
62
  orientation: 0 ,
62
- actionViewItemProvider: (action) => {
63
+ actionViewItemProvider: (action, options) => {
63
64
  if (action.id === FOCUS_SESSION_ID) {
64
65
  return this.instantiationService.createInstance(FocusSessionActionViewItem, action, undefined);
65
66
  }
66
67
  else if (action.id === STOP_ID || action.id === DISCONNECT_ID) {
67
68
  this.stopActionViewItemDisposables.clear();
68
- const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor));
69
+ const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor, { hoverDelegate: options.hoverDelegate }));
69
70
  if (item) {
70
71
  return item;
71
72
  }
72
73
  }
73
- return createActionViewItem(this.instantiationService, action);
74
+ return createActionViewItem(this.instantiationService, action, options);
74
75
  }
75
76
  })));
76
77
  this.updateScheduler = this._register(( new RunOnceScheduler(() => {
@@ -127,13 +128,12 @@ let DebugToolBar = class DebugToolBar extends Themable {
127
128
  getWindow(this.layoutService.activeContainer);
128
129
  }));
129
130
  this._register(this.layoutService.onDidChangePartVisibility(() => this.setYCoordinate()));
130
- this._register(PixelRatio.onDidChange(() => this.setYCoordinate()));
131
131
  const resizeListener = this._register(( new MutableDisposable()));
132
132
  this._register(this.layoutService.onDidChangeActiveContainer(() => {
133
133
  this._yRange = undefined;
134
134
  this.layoutService.whenActiveContainerStylesLoaded.then(() => {
135
135
  if (this.isBuilt) {
136
- this.layoutService.activeContainer.appendChild(this.$el);
136
+ this.doShowInActiveContainer();
137
137
  this.setCoordinates();
138
138
  }
139
139
  resizeListener.value = this._register(addDisposableListener(getWindow(this.layoutService.activeContainer), EventType.RESIZE, () => this.setYCoordinate()));
@@ -180,7 +180,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
180
180
  const positionPercentage = isMainWindow
181
181
  ? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, 0 ))
182
182
  : this.auxWindowCoordinates.get(currentWindow)?.x;
183
- x = positionPercentage !== undefined
183
+ x = positionPercentage !== undefined && !isNaN(positionPercentage)
184
184
  ? positionPercentage * currentWindow.innerWidth
185
185
  : (0.5 * currentWindow.innerWidth - 0.5 * widgetWidth);
186
186
  }
@@ -229,12 +229,16 @@ let DebugToolBar = class DebugToolBar extends Themable {
229
229
  }
230
230
  if (!this.isBuilt) {
231
231
  this.isBuilt = true;
232
- this.layoutService.activeContainer.appendChild(this.$el);
232
+ this.doShowInActiveContainer();
233
233
  }
234
234
  this.isVisible = true;
235
235
  show(this.$el);
236
236
  this.setCoordinates();
237
237
  }
238
+ doShowInActiveContainer() {
239
+ this.layoutService.activeContainer.appendChild(this.$el);
240
+ this.trackPixelRatioListener.value = PixelRatio.getInstance(getWindow(this.$el)).onDidChange(() => this.setYCoordinate());
241
+ }
238
242
  hide() {
239
243
  this.isVisible = false;
240
244
  hide(this.$el);
@@ -256,7 +260,7 @@ DebugToolBar = ( __decorate([
256
260
  ( __param(8, IMenuService)),
257
261
  ( __param(9, IContextKeyService))
258
262
  ], DebugToolBar));
259
- function createDisconnectMenuItemAction(action, disposables, accessor) {
263
+ function createDisconnectMenuItemAction(action, disposables, accessor, options) {
260
264
  const menuService = accessor.get(IMenuService);
261
265
  const contextKeyService = accessor.get(IContextKeyService);
262
266
  const instantiationService = accessor.get(IInstantiationService);
@@ -272,7 +276,7 @@ function createDisconnectMenuItemAction(action, disposables, accessor) {
272
276
  'notebook.moreRunActionsLabel',
273
277
  "More..."
274
278
  )), 'codicon-chevron-down', true)));
275
- const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, secondary, 'debug-stop-actions', contextMenuService, {});
279
+ const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, secondary, 'debug-stop-actions', contextMenuService, options);
276
280
  return item;
277
281
  }
278
282
  const debugViewTitleItems = [];
@@ -19,7 +19,7 @@ import { WorkbenchStateContext } from 'vscode/vscode/vs/workbench/common/context
19
19
  import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
20
20
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
21
21
  import { StartDebugActionViewItem, FocusSessionActionViewItem } from './debugActionViewItems.js';
22
- import { DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL, FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID } from './debugCommands.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
23
  import { debugConfigure } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
24
24
  import { createDisconnectMenuItemAction } from './debugToolBar.js';
25
25
  import { WelcomeView } from './welcomeView.js';
@@ -62,9 +62,9 @@ let DebugViewPaneContainer = class DebugViewPaneContainer extends ViewPaneContai
62
62
  this.focusView(WelcomeView.ID);
63
63
  }
64
64
  }
65
- getActionViewItem(action) {
65
+ getActionViewItem(action, options) {
66
66
  if (action.id === DEBUG_START_COMMAND_ID) {
67
- this.startDebugActionViewItem = this.instantiationService.createInstance(StartDebugActionViewItem, null, action);
67
+ this.startDebugActionViewItem = this.instantiationService.createInstance(StartDebugActionViewItem, null, action, options);
68
68
  return this.startDebugActionViewItem;
69
69
  }
70
70
  if (action.id === FOCUS_SESSION_ID) {
@@ -78,12 +78,12 @@ let DebugViewPaneContainer = class DebugViewPaneContainer extends ViewPaneContai
78
78
  }
79
79
  if (action.id === STOP_ID || action.id === DISCONNECT_ID) {
80
80
  this.stopActionViewItemDisposables.clear();
81
- const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor));
81
+ const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, this.stopActionViewItemDisposables, accessor, { hoverDelegate: options.hoverDelegate }));
82
82
  if (item) {
83
83
  return item;
84
84
  }
85
85
  }
86
- return createActionViewItem(this.instantiationService, action);
86
+ return createActionViewItem(this.instantiationService, action, options);
87
87
  }
88
88
  focusView(id) {
89
89
  const view = this.getView(id);
@@ -144,7 +144,7 @@ DebugViewPaneContainer = ( __decorate([
144
144
  ( __param(12, IContextKeyService)),
145
145
  ( __param(13, IViewDescriptorService))
146
146
  ], DebugViewPaneContainer));
147
- ( MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
147
+ MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
148
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
149
  ContextKeyExpr.not('config.debug.hideLauncherWhileDebugging'),
150
150
  ContextKeyExpr.not('inDebugMode')
@@ -156,7 +156,7 @@ DebugViewPaneContainer = ( __decorate([
156
156
  id: DEBUG_START_COMMAND_ID,
157
157
  title: DEBUG_START_LABEL
158
158
  }
159
- }));
159
+ });
160
160
  registerAction2(class extends Action2 {
161
161
  constructor() {
162
162
  super({
@@ -251,5 +251,17 @@ registerAction2(class extends Action2 {
251
251
  }
252
252
  }
253
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
+ });
254
266
 
255
267
  export { DebugViewPaneContainer };
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { PixelRatio } from 'vscode/vscode/vs/base/browser/browser';
3
- import { append, $, addStandardDisposableListener } from 'vscode/vscode/vs/base/browser/dom';
2
+ import { PixelRatio } from 'vscode/vscode/vs/base/browser/pixelRatio';
3
+ import { getWindowById, append, $, addStandardDisposableListener } from 'vscode/vscode/vs/base/browser/dom';
4
4
  import { binarySearch2 } from 'vscode/vscode/vs/base/common/arrays';
5
5
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
6
6
  import { dispose, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
@@ -65,11 +65,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
65
65
  this._disassembledInstructions = undefined;
66
66
  this._onDidChangeStackFrame = this._register(( new Emitter({ leakWarningThreshold: 1000 })));
67
67
  this._previousDebuggingState = _debugService.state;
68
- this._fontInfo = BareFontInfo.createFromRawSettings(_configurationService.getValue('editor'), PixelRatio.value);
69
68
  this._register(_configurationService.onDidChangeConfiguration(e => {
70
- if (e.affectsConfiguration('editor')) {
71
- this._fontInfo = BareFontInfo.createFromRawSettings(_configurationService.getValue('editor'), PixelRatio.value);
72
- }
73
69
  if (e.affectsConfiguration('debug')) {
74
70
  const newValue = this._configurationService.getValue('debug').disassemblyView.showSourceCode;
75
71
  if (this._enableSourceCodeRender !== newValue) {
@@ -81,7 +77,21 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
81
77
  }
82
78
  }));
83
79
  }
84
- get fontInfo() { return this._fontInfo; }
80
+ get fontInfo() {
81
+ if (!this._fontInfo) {
82
+ this._fontInfo = this.createFontInfo();
83
+ this._register(this._configurationService.onDidChangeConfiguration(e => {
84
+ if (e.affectsConfiguration('editor')) {
85
+ this._fontInfo = this.createFontInfo();
86
+ }
87
+ }));
88
+ }
89
+ return this._fontInfo;
90
+ }
91
+ createFontInfo() {
92
+ const window = getWindowById(this.group?.windowId, true).window;
93
+ return BareFontInfo.createFromRawSettings(this._configurationService.getValue('editor'), PixelRatio.getInstance(window).value);
94
+ }
85
95
  get currentInstructionAddresses() {
86
96
  return ( ( ( ( this._debugService.getModel().getSessions(false).
87
97
  map(session => session.getAllThreads())).
@@ -516,7 +526,7 @@ let BreakpointRenderer = class BreakpointRenderer {
516
526
  this._debugService.removeInstructionBreakpoints(reference, offset);
517
527
  }
518
528
  else if (currentElement.element.allowBreakpoint && !currentElement.element.isBreakpointSet) {
519
- this._debugService.addInstructionBreakpoint(reference, offset, currentElement.element.address);
529
+ this._debugService.addInstructionBreakpoint({ instructionReference: reference, offset, address: currentElement.element.address, canPersist: false });
520
530
  }
521
531
  }
522
532
  })
@@ -98,7 +98,7 @@ let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
98
98
  }
99
99
  _doLayout(_heightInPixel, _widthInPixel) {
100
100
  this.container.style.height = 'initial';
101
- const lineHeight = this.editor.getOption(66 );
101
+ const lineHeight = this.editor.getOption(67 );
102
102
  const arrowHeight = Math.round(lineHeight / 3);
103
103
  const computedLinesNumber = Math.ceil((this.container.offsetHeight + arrowHeight) / lineHeight);
104
104
  this._relayout(computedLinesNumber);
@@ -1,15 +1,15 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
2
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
3
  import { posix, isAbsolute, normalize } from 'vscode/vscode/vs/base/common/path';
4
- import { ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
4
+ import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
5
+ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
5
6
  import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
6
7
  import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
7
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
8
8
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
9
9
  import { renderViewTree } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
10
- import { CONTEXT_LOADED_SCRIPTS_ITEM_TYPE, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
10
+ import { LOADED_SCRIPTS_VIEW_ID, CONTEXT_LOADED_SCRIPTS_ITEM_TYPE, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
11
11
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
12
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
12
+ import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
13
13
  import { normalizeDriveLetter, tildify } from 'vscode/vscode/vs/base/common/labels';
14
14
  import { isWindows } from 'vscode/vscode/vs/base/common/platform';
15
15
  import { URI } from 'vscode/vscode/vs/base/common/uri';
@@ -23,6 +23,8 @@ import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
23
23
  import { createMatches } from 'vscode/vscode/vs/base/common/filters';
24
24
  import { DebugContentProvider } from '../common/debugContentProvider.js';
25
25
  import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label';
26
+ import { registerAction2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
27
+ import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
26
28
  import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
27
29
  import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
28
30
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
@@ -488,6 +490,9 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
488
490
  super.layoutBody(height, width);
489
491
  this.tree.layout(height, width);
490
492
  }
493
+ collapseAll() {
494
+ this.tree.collapseAll();
495
+ }
491
496
  dispose() {
492
497
  dispose(this.tree);
493
498
  dispose(this.treeLabels);
@@ -636,5 +641,29 @@ class LoadedScriptsFilter {
636
641
  return 2 ;
637
642
  }
638
643
  }
644
+ registerAction2(class Collapse extends ViewAction {
645
+ constructor() {
646
+ super({
647
+ id: 'loadedScripts.collapse',
648
+ viewId: LOADED_SCRIPTS_VIEW_ID,
649
+ title: ( localizeWithPath(
650
+ 'vs/workbench/contrib/debug/browser/loadedScriptsView',
651
+ 'collapse',
652
+ "Collapse All"
653
+ )),
654
+ f1: false,
655
+ icon: Codicon.collapseAll,
656
+ menu: {
657
+ id: MenuId.ViewTitle,
658
+ order: 30,
659
+ group: 'navigation',
660
+ when: ( ContextKeyExpr.equals('view', LOADED_SCRIPTS_VIEW_ID))
661
+ }
662
+ });
663
+ }
664
+ runInView(_accessor, view) {
665
+ view.collapseAll();
666
+ }
667
+ });
639
668
 
640
669
  export { LoadedScriptsView };
@@ -0,0 +1,12 @@
1
+ var pngAssets = {
2
+ 'vs/workbench/contrib/debug/browser/media/continue-tb.png': new URL('../../../../../../../../assets/continue-tb.png', import.meta.url).href,
3
+ 'vs/workbench/contrib/debug/browser/media/pause-tb.png': new URL('../../../../../../../../assets/pause-tb.png', import.meta.url).href,
4
+ 'vs/workbench/contrib/debug/browser/media/restart-tb.png': new URL('../../../../../../../../assets/restart-tb.png', import.meta.url).href,
5
+ 'vs/workbench/contrib/debug/browser/media/run-with-debugging-tb.png': new URL('../../../../../../../../assets/run-with-debugging-tb.png', import.meta.url).href,
6
+ 'vs/workbench/contrib/debug/browser/media/stepinto-tb.png': new URL('../../../../../../../../assets/stepinto-tb.png', import.meta.url).href,
7
+ 'vs/workbench/contrib/debug/browser/media/stepout-tb.png': new URL('../../../../../../../../assets/stepout-tb.png', import.meta.url).href,
8
+ 'vs/workbench/contrib/debug/browser/media/stepover-tb.png': new URL('../../../../../../../../assets/stepover-tb.png', import.meta.url).href,
9
+ 'vs/workbench/contrib/debug/browser/media/stop-tb.png': new URL('../../../../../../../../assets/stop-tb.png', import.meta.url).href
10
+ };
11
+
12
+ export { pngAssets as default };
@@ -55,7 +55,7 @@ import { Variable } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugM
55
55
  import { ReplEvaluationResult, ReplGroup } from 'vscode/vscode/vs/workbench/contrib/debug/common/replModel';
56
56
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
57
57
  import { registerNavigableContainer } from 'vscode/vscode/vs/workbench/browser/actions/widgetNavigationCommands';
58
- import { IAudioCueService, AudioCue } from 'vscode/vscode/vs/platform/audioCues/browser/audioCueService';
58
+ import { IAccessibilitySignalService, AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
59
59
 
60
60
  var Repl_1, ReplOptions_1;
61
61
  const $ = $$1;
@@ -294,7 +294,7 @@ let Repl = class Repl extends FilterViewPane {
294
294
  lineHeight: this.replOptions.replConfiguration.lineHeight,
295
295
  fontFamily: this.replOptions.replConfiguration.fontFamily === 'default' ? EDITOR_FONT_DEFAULTS.fontFamily : this.replOptions.replConfiguration.fontFamily
296
296
  });
297
- const replInputLineHeight = this.replInput.getOption(66 );
297
+ const replInputLineHeight = this.replInput.getOption(67 );
298
298
  this.styleElement.textContent = `
299
299
  .repl .repl-input-wrapper .repl-input-chevron {
300
300
  line-height: ${replInputLineHeight}px
@@ -875,9 +875,9 @@ registerAction2(class extends ViewAction {
875
875
  });
876
876
  }
877
877
  runInView(_accessor, view) {
878
- const audioCueService = _accessor.get(IAudioCueService);
878
+ const accessibilitySignalService = _accessor.get(IAccessibilitySignalService);
879
879
  view.clearRepl();
880
- audioCueService.playAudioCue(AudioCue.clear);
880
+ accessibilitySignalService.playSignal(AccessibilitySignal.clear);
881
881
  }
882
882
  });
883
883
  registerAction2(class extends ViewAction {
@@ -27,16 +27,16 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
27
27
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
28
28
  import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
29
29
  import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
30
- import { AbstractExpressionsRenderer, renderVariable, renderViewTree } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
30
+ import { AbstractExpressionsRenderer, renderExpressionValue, renderVariable, renderViewTree, AbstractExpressionDataSource } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
31
31
  import { LinkDetector } from './linkDetector.js';
32
32
  import { IDebugService, VARIABLES_VIEW_ID, CONTEXT_VARIABLES_FOCUSED, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
33
33
  import { getContextForVariable } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugContext';
34
- import { Variable, getUriForDebugMemory, Expression, ErrorScope, Scope, StackFrame } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
34
+ import { VisualizedExpression, Variable, getUriForDebugMemory, Expression, ErrorScope, Scope, StackFrame } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
35
35
  import { IDebugVisualizerService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugVisualizers';
36
36
  import { IEditorService, SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
37
37
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
38
38
 
39
- var VariablesRenderer_1;
39
+ var VisualizedVariableRenderer_1, VariablesRenderer_1;
40
40
  const $ = $$1;
41
41
  let forgetScopes = true;
42
42
  let variableInternalContext;
@@ -75,8 +75,13 @@ let VariablesView = class VariablesView extends ViewPane {
75
75
  this.element.classList.add('debug-pane');
76
76
  container.classList.add('debug-variables');
77
77
  const treeContainer = renderViewTree(container);
78
- const linkeDetector = this.instantiationService.createInstance(LinkDetector);
79
- this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, ( new VariablesDelegate()), [this.instantiationService.createInstance(VariablesRenderer, linkeDetector), ( new ScopesRenderer()), ( new ScopeErrorRenderer())], ( new VariablesDataSource()), {
78
+ const linkDetector = this.instantiationService.createInstance(LinkDetector);
79
+ this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, ( new VariablesDelegate()), [
80
+ this.instantiationService.createInstance(VariablesRenderer, linkDetector),
81
+ this.instantiationService.createInstance(VisualizedVariableRenderer, linkDetector),
82
+ ( new ScopesRenderer()),
83
+ ( new ScopeErrorRenderer()),
84
+ ], this.instantiationService.createInstance(VariablesDataSource), {
80
85
  accessibilityProvider: ( new VariablesAccessibilityProvider()),
81
86
  identityProvider: { getId: (element) => element.getId() },
82
87
  keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e) => e.name },
@@ -84,6 +89,7 @@ let VariablesView = class VariablesView extends ViewPane {
84
89
  listBackground: this.getBackgroundColor()
85
90
  }
86
91
  });
92
+ this._register(VisualizedVariableRenderer.rendererOnVisualizationRange(this.debugService.getViewModel(), this.tree));
87
93
  this.tree.setInput(this.debugService.getViewModel().focusedStackFrame ?? null);
88
94
  CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService);
89
95
  this._register(this.debugService.getViewModel().onDidFocusStackFrame(sf => {
@@ -113,7 +119,7 @@ let VariablesView = class VariablesView extends ViewPane {
113
119
  let horizontalScrolling;
114
120
  this._register(this.debugService.getViewModel().onDidSelectExpression(e => {
115
121
  const variable = e?.expression;
116
- if (variable instanceof Variable && !e?.settingWatch) {
122
+ if (variable && this.tree.hasNode(variable)) {
117
123
  horizontalScrolling = this.tree.options.horizontalScrolling;
118
124
  if (horizontalScrolling) {
119
125
  this.tree.updateOptions({ horizontalScrolling: false });
@@ -148,11 +154,20 @@ let VariablesView = class VariablesView extends ViewPane {
148
154
  this.tree.collapseAll();
149
155
  }
150
156
  onMouseDblClick(e) {
151
- const session = this.debugService.getViewModel().focusedSession;
152
- if (session && e.element instanceof Variable && session.capabilities.supportsSetVariable && !e.element.presentationHint?.attributes?.includes('readOnly') && !e.element.presentationHint?.lazy) {
157
+ if (this.canSetExpressionValue(e.element)) {
153
158
  this.debugService.getViewModel().setSelectedExpression(e.element, false);
154
159
  }
155
160
  }
161
+ canSetExpressionValue(e) {
162
+ const session = this.debugService.getViewModel().focusedSession;
163
+ if (!session) {
164
+ return false;
165
+ }
166
+ if (e instanceof VisualizedExpression) {
167
+ return !!e.treeItem.canEdit;
168
+ }
169
+ return e instanceof Variable && !e.presentationHint?.attributes?.includes('readOnly') && !e.presentationHint?.lazy;
170
+ }
156
171
  async onContextMenu(e) {
157
172
  const variable = e.element;
158
173
  if (!(variable instanceof Variable) || !variable.value) {
@@ -238,7 +253,7 @@ function getContextForVariableMenuBase(parentContext, variable, additionalContex
238
253
  function isStackFrame(obj) {
239
254
  return obj instanceof StackFrame;
240
255
  }
241
- class VariablesDataSource {
256
+ class VariablesDataSource extends AbstractExpressionDataSource {
242
257
  hasChildren(element) {
243
258
  if (!element) {
244
259
  return false;
@@ -248,7 +263,7 @@ class VariablesDataSource {
248
263
  }
249
264
  return element.hasChildren;
250
265
  }
251
- getChildren(element) {
266
+ doGetChildren(element) {
252
267
  if (isStackFrame(element)) {
253
268
  return element.getScopes();
254
269
  }
@@ -266,6 +281,9 @@ class VariablesDelegate {
266
281
  if (element instanceof Scope) {
267
282
  return ScopesRenderer.ID;
268
283
  }
284
+ if (element instanceof VisualizedExpression) {
285
+ return VisualizedVariableRenderer.ID;
286
+ }
269
287
  return VariablesRenderer.ID;
270
288
  }
271
289
  }
@@ -301,6 +319,96 @@ class ScopeErrorRenderer {
301
319
  disposeTemplate() {
302
320
  }
303
321
  }
322
+ let VisualizedVariableRenderer = class VisualizedVariableRenderer extends AbstractExpressionsRenderer {
323
+ static { VisualizedVariableRenderer_1 = this; }
324
+ static { this.ID = 'viz'; }
325
+ static rendererOnVisualizationRange(model, tree) {
326
+ return model.onDidChangeVisualization(({ original }) => {
327
+ if (!tree.hasNode(original)) {
328
+ return;
329
+ }
330
+ const parent = tree.getParentElement(original);
331
+ tree.updateChildren(parent, false, false);
332
+ });
333
+ }
334
+ constructor(linkDetector, debugService, contextViewService, menuService, contextKeyService) {
335
+ super(debugService, contextViewService);
336
+ this.linkDetector = linkDetector;
337
+ this.menuService = menuService;
338
+ this.contextKeyService = contextKeyService;
339
+ }
340
+ get templateId() {
341
+ return VisualizedVariableRenderer_1.ID;
342
+ }
343
+ renderElement(node, index, data) {
344
+ super.renderExpressionElement(node.element, node, data);
345
+ }
346
+ renderExpression(expression, data, highlights) {
347
+ const viz = expression;
348
+ let text = viz.name;
349
+ if (viz.value && typeof viz.name === 'string') {
350
+ text += ':';
351
+ }
352
+ data.label.set(text, highlights, viz.name);
353
+ renderExpressionValue(viz, data.value, {
354
+ showChanged: false,
355
+ maxValueLength: 1024,
356
+ showHover: true,
357
+ colorize: true,
358
+ linkDetector: this.linkDetector
359
+ });
360
+ }
361
+ getInputBoxOptions(expression) {
362
+ const viz = expression;
363
+ return {
364
+ initialValue: expression.value,
365
+ ariaLabel: ( localizeWithPath(
366
+ 'vs/workbench/contrib/debug/browser/variablesView',
367
+ 'variableValueAriaLabel',
368
+ "Type new variable value"
369
+ )),
370
+ validationOptions: {
371
+ validation: () => viz.errorMessage ? ({ content: viz.errorMessage }) : null
372
+ },
373
+ onFinish: (value, success) => {
374
+ viz.errorMessage = undefined;
375
+ if (success) {
376
+ viz.edit(value).then(() => {
377
+ forgetScopes = false;
378
+ this.debugService.getViewModel().updateViews();
379
+ });
380
+ }
381
+ }
382
+ };
383
+ }
384
+ renderActionBar(actionBar, expression, _data) {
385
+ const viz = expression;
386
+ const contextKeyService = viz.original ? getContextForVariableMenuBase(this.contextKeyService, viz.original) : this.contextKeyService;
387
+ const menu = this.menuService.createMenu(MenuId.DebugVariablesContext, contextKeyService);
388
+ const primary = [];
389
+ const context = viz.original ? getVariablesContext(viz.original) : undefined;
390
+ createAndFillInContextMenuActions(menu, { arg: context, shouldForwardArgs: false }, { primary, secondary: [] }, 'inline');
391
+ if (viz.original) {
392
+ const action = ( new Action('debugViz', ( localizeWithPath(
393
+ 'vs/workbench/contrib/debug/browser/variablesView',
394
+ 'removeVisualizer',
395
+ 'Remove Visualizer'
396
+ )), ThemeIcon.asClassName(Codicon.eye), true, () => this.debugService.getViewModel().setVisualizedExpression(viz.original, undefined)));
397
+ action.checked = true;
398
+ primary.push(action);
399
+ actionBar.domNode.style.display = 'initial';
400
+ }
401
+ actionBar.clear();
402
+ actionBar.context = context;
403
+ actionBar.push(primary, { icon: true, label: false });
404
+ }
405
+ };
406
+ VisualizedVariableRenderer = VisualizedVariableRenderer_1 = ( __decorate([
407
+ ( __param(1, IDebugService)),
408
+ ( __param(2, IContextViewService)),
409
+ ( __param(3, IMenuService)),
410
+ ( __param(4, IContextKeyService))
411
+ ], VisualizedVariableRenderer));
304
412
  let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRenderer {
305
413
  static { VariablesRenderer_1 = this; }
306
414
  static { this.ID = 'variable'; }
@@ -360,12 +468,13 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
360
468
  data.elementDisposable.add(toDisposable(() => cts.dispose(true)));
361
469
  this.visualization.getApplicableFor(expression, cts.token).then(result => {
362
470
  data.elementDisposable.add(result);
471
+ const originalExpression = (expression instanceof VisualizedExpression && expression.original) || expression;
363
472
  const actions = ( result.object.map(v => ( new Action(
364
473
  'debugViz',
365
474
  v.name,
366
475
  v.iconClass || 'debug-viz-icon',
367
476
  undefined,
368
- this.useVisualizer(v, cts.token)
477
+ this.useVisualizer(v, originalExpression, cts.token)
369
478
  ))));
370
479
  if (actions.length === 0) ;
371
480
  else if (actions.length === 1) {
@@ -376,7 +485,7 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
376
485
  'vs/workbench/contrib/debug/browser/variablesView',
377
486
  'useVisualizer',
378
487
  'Visualize Variable...'
379
- )), ThemeIcon.asClassName(Codicon.eye), undefined, () => this.pickVisualizer(actions, expression, data))), { icon: true, label: false });
488
+ )), ThemeIcon.asClassName(Codicon.eye), undefined, () => this.pickVisualizer(actions, originalExpression, data))), { icon: true, label: false });
380
489
  }
381
490
  });
382
491
  }
@@ -386,7 +495,7 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
386
495
  getActions: () => actions,
387
496
  });
388
497
  }
389
- useVisualizer(viz, token) {
498
+ useVisualizer(viz, expression, token) {
390
499
  return async () => {
391
500
  const resolved = await viz.resolve(token);
392
501
  if (token.isCancellationRequested) {
@@ -396,7 +505,10 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
396
505
  viz.execute();
397
506
  }
398
507
  else {
399
- throw new Error('not implemented, yet');
508
+ const replacement = await this.visualization.getVisualizedNodeFor(resolved.id, expression);
509
+ if (replacement) {
510
+ this.debugService.getViewModel().setVisualizedExpression(expression, replacement);
511
+ }
400
512
  }
401
513
  };
402
514
  }
@@ -584,7 +696,7 @@ CommandsRegistry.registerCommand({
584
696
  handler: async (accessor) => {
585
697
  const debugService = accessor.get(IDebugService);
586
698
  if (dataBreakpointInfoResponse) {
587
- await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'write');
699
+ await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'write', undefined);
588
700
  }
589
701
  }
590
702
  });
@@ -594,7 +706,7 @@ CommandsRegistry.registerCommand({
594
706
  handler: async (accessor) => {
595
707
  const debugService = accessor.get(IDebugService);
596
708
  if (dataBreakpointInfoResponse) {
597
- await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'readWrite');
709
+ await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'readWrite', undefined);
598
710
  }
599
711
  }
600
712
  });
@@ -604,7 +716,7 @@ CommandsRegistry.registerCommand({
604
716
  handler: async (accessor) => {
605
717
  const debugService = accessor.get(IDebugService);
606
718
  if (dataBreakpointInfoResponse) {
607
- await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'read');
719
+ await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'read', undefined);
608
720
  }
609
721
  }
610
722
  });
@@ -648,4 +760,4 @@ registerAction2(class extends ViewAction {
648
760
  }
649
761
  });
650
762
 
651
- export { ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, BREAK_WHEN_VALUE_IS_READ_ID, COPY_EVALUATE_PATH_ID, COPY_VALUE_ID, SET_VARIABLE_ID, VIEW_MEMORY_ID, VariablesRenderer, VariablesView, openContextMenuForVariableTreeElement };
763
+ export { ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, BREAK_WHEN_VALUE_IS_READ_ID, COPY_EVALUATE_PATH_ID, COPY_VALUE_ID, SET_VARIABLE_ID, VIEW_MEMORY_ID, VariablesRenderer, VariablesView, VisualizedVariableRenderer, openContextMenuForVariableTreeElement };