@codingame/monaco-vscode-debug-service-override 2.2.2 → 3.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 (25) hide show
  1. package/debug.js +1 -0
  2. package/package.json +2 -2
  3. package/tools/debugAssets.js +4 -0
  4. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +2 -2
  5. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +180 -4
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +8 -8
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +112 -50
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +7 -10
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +14 -7
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +2 -4
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +8 -8
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +5 -6
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +14 -10
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +19 -7
  15. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +18 -8
  16. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +33 -4
  18. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +4 -4
  19. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +130 -18
  20. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +28 -20
  21. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +3 -2
  22. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +48 -4
  23. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +11 -24
  24. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +29 -0
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +64 -0
@@ -7,7 +7,7 @@ import { Position } from 'vscode/vscode/vs/editor/common/core/position';
7
7
  import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
8
8
  import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
9
9
  import { MessageController } from 'vscode/vscode/vs/editor/contrib/message/browser/messageController';
10
- import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
10
+ import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
11
11
  import { Action2, MenuId, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
12
12
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
13
13
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
@@ -27,12 +27,11 @@ class ToggleBreakpointAction extends Action2 {
27
27
  super({
28
28
  id: 'editor.debug.action.toggleBreakpoint',
29
29
  title: {
30
- value: ( localizeWithPath(
30
+ ...( localize2WithPath(
31
31
  'vs/workbench/contrib/debug/browser/debugEditorActions',
32
32
  'toggleBreakpointAction',
33
33
  "Debug: Toggle Breakpoint"
34
34
  )),
35
- original: 'Debug: Toggle Breakpoint',
36
35
  mnemonicTitle: ( localizeWithPath(
37
36
  'vs/workbench/contrib/debug/browser/debugEditorActions',
38
37
  { key: 'miToggleBreakpoint', comment: ['&& denotes a mnemonic'] },
@@ -66,7 +65,7 @@ class ToggleBreakpointAction extends Action2 {
66
65
  debugService.removeInstructionBreakpoints(toRemove.instructionReference, toRemove.offset);
67
66
  }
68
67
  else {
69
- debugService.addInstructionBreakpoint(location.reference, location.offset, location.address);
68
+ debugService.addInstructionBreakpoint({ instructionReference: location.reference, offset: location.offset, address: location.address, canPersist: false });
70
69
  }
71
70
  }
72
71
  return;
@@ -241,17 +240,16 @@ class OpenDisassemblyViewAction extends Action2 {
241
240
  super({
242
241
  id: OpenDisassemblyViewAction.ID,
243
242
  title: {
244
- value: ( localizeWithPath(
243
+ ...( localize2WithPath(
245
244
  'vs/workbench/contrib/debug/browser/debugEditorActions',
246
245
  'openDisassemblyView',
247
246
  "Open Disassembly View"
248
247
  )),
249
- original: 'Open Disassembly View',
250
248
  mnemonicTitle: ( localizeWithPath(
251
249
  'vs/workbench/contrib/debug/browser/debugEditorActions',
252
250
  { key: 'miDisassemblyView', comment: ['&& denotes a mnemonic'] },
253
251
  "&&DisassemblyView"
254
- ))
252
+ )),
255
253
  },
256
254
  precondition: CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE,
257
255
  menu: [
@@ -286,17 +284,16 @@ class ToggleDisassemblyViewSourceCodeAction extends Action2 {
286
284
  super({
287
285
  id: ToggleDisassemblyViewSourceCodeAction.ID,
288
286
  title: {
289
- value: ( localizeWithPath(
287
+ ...( localize2WithPath(
290
288
  'vs/workbench/contrib/debug/browser/debugEditorActions',
291
289
  'toggleDisassemblyViewSourceCode',
292
290
  "Toggle Source Code in Disassembly View"
293
291
  )),
294
- original: 'Toggle Source Code in Disassembly View',
295
292
  mnemonicTitle: ( localizeWithPath(
296
293
  'vs/workbench/contrib/debug/browser/debugEditorActions',
297
294
  { key: 'mitogglesource', comment: ['&& denotes a mnemonic'] },
298
295
  "&&ToggleSource"
299
- ))
296
+ )),
300
297
  },
301
298
  f1: true,
302
299
  });
@@ -17,11 +17,11 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
17
17
  import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
18
18
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
19
19
  import { editorHoverBackground, asCssVariable, editorHoverBorder, editorHoverForeground } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
20
- import { renderExpressionValue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
20
+ import { renderExpressionValue, AbstractExpressionDataSource } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
21
21
  import { LinkDetector } from './linkDetector.js';
22
- import { VariablesRenderer, openContextMenuForVariableTreeElement } from './variablesView.js';
22
+ import { VariablesRenderer, VisualizedVariableRenderer, openContextMenuForVariableTreeElement } from './variablesView.js';
23
23
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
24
- import { Variable, Expression } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
24
+ import { Variable, Expression, VisualizedExpression } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
25
25
  import { getEvaluatableExpressionAtPosition } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
26
26
 
27
27
  var DebugHoverWidget_1;
@@ -83,9 +83,12 @@ let DebugHoverWidget = class DebugHoverWidget {
83
83
  'Hold {0} key to switch to editor language hover',
84
84
  isMacintosh ? 'Option' : 'Alt'
85
85
  ));
86
- const dataSource = ( new DebugHoverDataSource());
86
+ const dataSource = this.instantiationService.createInstance(DebugHoverDataSource);
87
87
  const linkeDetector = this.instantiationService.createInstance(LinkDetector);
88
- this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, ( new DebugHoverDelegate()), [this.instantiationService.createInstance(VariablesRenderer, linkeDetector)], dataSource, {
88
+ this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, ( new DebugHoverDelegate()), [
89
+ this.instantiationService.createInstance(VariablesRenderer, linkeDetector),
90
+ this.instantiationService.createInstance(VisualizedVariableRenderer, linkeDetector),
91
+ ], dataSource, {
89
92
  accessibilityProvider: ( new DebugHoverAccessibilityProvider()),
90
93
  mouseSupport: false,
91
94
  horizontalScrolling: true,
@@ -95,6 +98,7 @@ let DebugHoverWidget = class DebugHoverWidget {
95
98
  listBackground: editorHoverBackground
96
99
  }
97
100
  });
101
+ this.toDispose.push(VisualizedVariableRenderer.rendererOnVisualizationRange(this.debugService.getViewModel(), this.tree));
98
102
  this.valueContainer = $('.value');
99
103
  this.valueContainer.tabIndex = 0;
100
104
  this.valueContainer.setAttribute('role', 'tooltip');
@@ -322,11 +326,11 @@ class DebugHoverAccessibilityProvider {
322
326
  ));
323
327
  }
324
328
  }
325
- class DebugHoverDataSource {
329
+ class DebugHoverDataSource extends AbstractExpressionDataSource {
326
330
  hasChildren(element) {
327
331
  return element.hasChildren;
328
332
  }
329
- getChildren(element) {
333
+ doGetChildren(element) {
330
334
  return element.getChildren();
331
335
  }
332
336
  }
@@ -335,6 +339,9 @@ class DebugHoverDelegate {
335
339
  return 18;
336
340
  }
337
341
  getTemplateId(element) {
342
+ if (element instanceof VisualizedExpression) {
343
+ return VisualizedVariableRenderer.ID;
344
+ }
338
345
  return VariablesRenderer.ID;
339
346
  }
340
347
  }
@@ -1,10 +1,9 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
2
  import { Event } from 'vscode/vscode/vs/base/common/event';
3
- import { VIEWLET_ID, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
4
- import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
5
3
  import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
4
+ import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
5
+ import { VIEWLET_ID, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
6
6
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
7
- import { NotificationPriority } from 'vscode/vscode/vs/platform/notification/common/notification';
8
7
 
9
8
  let DebugProgressContribution = class DebugProgressContribution {
10
9
  constructor(debugService, progressService, viewsService) {
@@ -31,7 +30,6 @@ let DebugProgressContribution = class DebugProgressContribution {
31
30
  location: 15 ,
32
31
  title: progressStartEvent.body.title,
33
32
  cancellable: progressStartEvent.body.cancellable,
34
- priority: NotificationPriority.SILENT,
35
33
  source,
36
34
  delay: 500
37
35
  }, progressStep => {
@@ -952,8 +952,8 @@ let DebugService = class DebugService {
952
952
  this.model.setBreakpointsActivated(activated);
953
953
  return this.sendAllBreakpoints();
954
954
  }
955
- addFunctionBreakpoint(name, id) {
956
- this.model.addFunctionBreakpoint(name || '', id);
955
+ addFunctionBreakpoint(name, id, mode) {
956
+ this.model.addFunctionBreakpoint(name || '', id, mode);
957
957
  }
958
958
  async updateFunctionBreakpoint(id, update) {
959
959
  this.model.updateFunctionBreakpoint(id, update);
@@ -965,8 +965,8 @@ let DebugService = class DebugService {
965
965
  this.debugStorage.storeBreakpoints(this.model);
966
966
  await this.sendFunctionBreakpoints();
967
967
  }
968
- async addDataBreakpoint(label, dataId, canPersist, accessTypes, accessType) {
969
- this.model.addDataBreakpoint(label, dataId, canPersist, accessTypes, accessType);
968
+ async addDataBreakpoint(description, dataId, canPersist, accessTypes, accessType, mode) {
969
+ this.model.addDataBreakpoint({ description, dataId, canPersist, accessTypes, accessType, mode });
970
970
  this.debugStorage.storeBreakpoints(this.model);
971
971
  await this.sendDataBreakpoints();
972
972
  this.debugStorage.storeBreakpoints(this.model);
@@ -981,8 +981,8 @@ let DebugService = class DebugService {
981
981
  this.debugStorage.storeBreakpoints(this.model);
982
982
  await this.sendDataBreakpoints();
983
983
  }
984
- async addInstructionBreakpoint(instructionReference, offset, address, condition, hitCondition) {
985
- this.model.addInstructionBreakpoint(instructionReference, offset, address, condition, hitCondition);
984
+ async addInstructionBreakpoint(opts) {
985
+ this.model.addInstructionBreakpoint(opts);
986
986
  this.debugStorage.storeBreakpoints(this.model);
987
987
  await this.sendInstructionBreakpoints();
988
988
  this.debugStorage.storeBreakpoints(this.model);
@@ -996,8 +996,8 @@ let DebugService = class DebugService {
996
996
  this.model.setExceptionBreakpointFallbackSession(sessionId);
997
997
  this.debugStorage.storeBreakpoints(this.model);
998
998
  }
999
- setExceptionBreakpointsForSession(session, data) {
1000
- this.model.setExceptionBreakpointsForSession(session.getId(), data);
999
+ setExceptionBreakpointsForSession(session, filters) {
1000
+ this.model.setExceptionBreakpointsForSession(session.getId(), filters);
1001
1001
  this.debugStorage.storeBreakpoints(this.model);
1002
1002
  }
1003
1003
  async setExceptionBreakpointCondition(exceptionBreakpoint, condition) {
@@ -259,6 +259,7 @@ let DebugSession = class DebugSession {
259
259
  this.initialized = true;
260
260
  this._onDidChangeState.fire();
261
261
  this.debugService.setExceptionBreakpointsForSession(this, (this.raw && this.raw.capabilities.exceptionBreakpointFilters) || []);
262
+ this.debugService.getModel().registerBreakpointModes(this.configuration.type, this.raw.capabilities.breakpointModes || []);
262
263
  }
263
264
  catch (err) {
264
265
  this.initialized = true;
@@ -347,9 +348,7 @@ let DebugSession = class DebugSession {
347
348
  const response = await this.raw.setBreakpoints({
348
349
  source: rawSource,
349
350
  lines: ( breakpointsToSend.map(bp => bp.sessionAgnosticData.lineNumber)),
350
- breakpoints: ( breakpointsToSend.map(
351
- bp => ({ line: bp.sessionAgnosticData.lineNumber, column: bp.sessionAgnosticData.column, condition: bp.condition, hitCondition: bp.hitCondition, logMessage: bp.logMessage })
352
- )),
351
+ breakpoints: ( breakpointsToSend.map(bp => bp.toDAP())),
353
352
  sourceModified
354
353
  });
355
354
  if (response && response.body) {
@@ -365,7 +364,7 @@ let DebugSession = class DebugSession {
365
364
  throw new Error(localizeWithPath('vs/workbench/contrib/debug/browser/debugSession', 'noDebugAdapter', "No debugger available, can not send '{0}'", 'function breakpoints'));
366
365
  }
367
366
  if (this.raw.readyForBreakpoints) {
368
- const response = await this.raw.setFunctionBreakpoints({ breakpoints: fbpts });
367
+ const response = await this.raw.setFunctionBreakpoints({ breakpoints: ( fbpts.map(bp => bp.toDAP())) });
369
368
  if (response && response.body) {
370
369
  const data = ( new Map());
371
370
  for (let i = 0; i < fbpts.length; i++) {
@@ -414,7 +413,7 @@ let DebugSession = class DebugSession {
414
413
  throw new Error(localizeWithPath('vs/workbench/contrib/debug/browser/debugSession', 'noDebugAdapter', "No debugger available, can not send '{0}'", 'data breakpoints'));
415
414
  }
416
415
  if (this.raw.readyForBreakpoints) {
417
- const response = await this.raw.setDataBreakpoints({ breakpoints: dataBreakpoints });
416
+ const response = await this.raw.setDataBreakpoints({ breakpoints: ( dataBreakpoints.map(bp => bp.toDAP())) });
418
417
  if (response && response.body) {
419
418
  const data = ( new Map());
420
419
  for (let i = 0; i < dataBreakpoints.length; i++) {
@@ -429,7 +428,7 @@ let DebugSession = class DebugSession {
429
428
  throw new Error(localizeWithPath('vs/workbench/contrib/debug/browser/debugSession', 'noDebugAdapter', "No debugger available, can not send '{0}'", 'instruction breakpoints'));
430
429
  }
431
430
  if (this.raw.readyForBreakpoints) {
432
- const response = await this.raw.setInstructionBreakpoints({ breakpoints: ( instructionBreakpoints.map(ib => ib.toJSON())) });
431
+ const response = await this.raw.setInstructionBreakpoints({ breakpoints: ( instructionBreakpoints.map(ib => ib.toDAP())) });
433
432
  if (response && response.body) {
434
433
  const data = ( new Map());
435
434
  for (let i = 0; i < instructionBreakpoints.length; i++) {
@@ -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 };
@@ -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 {