@codingame/monaco-vscode-debug-service-override 4.5.1 → 5.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 (43) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +2 -2
  3. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +140 -177
  4. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +260 -531
  5. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +34 -52
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +44 -71
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +116 -120
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +8 -11
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +81 -140
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +73 -76
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +30 -30
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +17 -49
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +143 -135
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +220 -177
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +9 -17
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +70 -111
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +84 -65
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +85 -57
  20. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +50 -75
  21. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +13 -29
  22. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +22 -51
  23. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +52 -78
  24. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
  25. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +1 -1
  26. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +60 -76
  27. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +29 -54
  28. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +4 -1
  29. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +42 -55
  30. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +17 -16
  31. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +84 -110
  32. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +50 -88
  33. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +60 -60
  34. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +14 -28
  35. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +12 -15
  36. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +71 -146
  37. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +1 -0
  38. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +92 -111
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +5 -12
  40. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +42 -22
  41. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -1042
  42. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -116
  43. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -87
@@ -5,6 +5,7 @@ import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/d
5
5
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
6
6
  import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
7
7
 
8
+ const _moduleId = "vs/workbench/contrib/debug/browser/debugStatus";
8
9
  let DebugStatusContribution = class DebugStatusContribution {
9
10
  constructor(statusBarService, debugService, configurationService) {
10
11
  this.statusBarService = statusBarService;
@@ -47,19 +48,10 @@ let DebugStatusContribution = class DebugStatusContribution {
47
48
  text = (manager.getLaunches().length > 1 ? `${name} (${manager.selectedConfiguration.launch.name})` : name);
48
49
  }
49
50
  return {
50
- name: ( localizeWithPath('vs/workbench/contrib/debug/browser/debugStatus', 'status.debug', "Debug")),
51
+ name: ( localizeWithPath(_moduleId, 0, "Debug")),
51
52
  text: '$(debug-alt-small) ' + text,
52
- ariaLabel: ( localizeWithPath(
53
- 'vs/workbench/contrib/debug/browser/debugStatus',
54
- 'debugTarget',
55
- "Debug: {0}",
56
- text
57
- )),
58
- tooltip: ( localizeWithPath(
59
- 'vs/workbench/contrib/debug/browser/debugStatus',
60
- 'selectAndStartDebug',
61
- "Select and start debug configuration"
62
- )),
53
+ ariaLabel: ( localizeWithPath(_moduleId, 1, "Debug: {0}", text)),
54
+ tooltip: ( localizeWithPath(_moduleId, 2, "Select and start debug configuration")),
63
55
  command: 'workbench.action.debug.selectandstart'
64
56
  };
65
57
  }
@@ -68,10 +60,10 @@ let DebugStatusContribution = class DebugStatusContribution {
68
60
  dispose(this.toDispose);
69
61
  }
70
62
  };
71
- DebugStatusContribution = ( __decorate([
72
- ( __param(0, IStatusbarService)),
73
- ( __param(1, IDebugService)),
74
- ( __param(2, IConfigurationService))
75
- ], DebugStatusContribution));
63
+ DebugStatusContribution = ( (__decorate([
64
+ ( (__param(0, IStatusbarService))),
65
+ ( (__param(1, IDebugService))),
66
+ ( (__param(2, IConfigurationService)))
67
+ ], DebugStatusContribution)));
76
68
 
77
69
  export { DebugStatusContribution };
@@ -11,9 +11,10 @@ import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/
11
11
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
12
12
  import { createErrorWithActions } from 'vscode/vscode/vs/base/common/errorMessage';
13
13
  import { Action } from 'vscode/vscode/vs/base/common/actions';
14
- import { DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL } from './debugCommands.js';
14
+ import { DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
15
15
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
16
16
 
17
+ const _moduleId = "vs/workbench/contrib/debug/browser/debugTaskRunner";
17
18
  function once(match, event) {
18
19
  return (listener, thisArgs = null, disposables) => {
19
20
  const result = event(e => {
@@ -63,70 +64,43 @@ let DebugTaskRunner = class DebugTaskRunner {
63
64
  }
64
65
  const taskLabel = typeof taskId === 'string' ? taskId : taskId ? taskId.name : '';
65
66
  const message = errorCount > 1
66
- ? ( localizeWithPath(
67
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
68
- 'preLaunchTaskErrors',
69
- "Errors exist after running preLaunchTask '{0}'.",
70
- taskLabel
71
- ))
67
+ ? ( localizeWithPath(_moduleId, 0, "Errors exist after running preLaunchTask '{0}'.", taskLabel))
72
68
  : errorCount === 1
73
- ? ( localizeWithPath(
74
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
75
- 'preLaunchTaskError',
76
- "Error exists after running preLaunchTask '{0}'.",
77
- taskLabel
78
- ))
69
+ ? ( localizeWithPath(_moduleId, 1, "Error exists after running preLaunchTask '{0}'.", taskLabel))
79
70
  : taskSummary && typeof taskSummary.exitCode === 'number'
80
71
  ? ( localizeWithPath(
81
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
82
- 'preLaunchTaskExitCode',
72
+ _moduleId,
73
+ 2,
83
74
  "The preLaunchTask '{0}' terminated with exit code {1}.",
84
75
  taskLabel,
85
76
  taskSummary.exitCode
86
77
  ))
87
- : ( localizeWithPath(
88
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
89
- 'preLaunchTaskTerminated',
90
- "The preLaunchTask '{0}' terminated.",
91
- taskLabel
92
- ));
78
+ : ( localizeWithPath(_moduleId, 3, "The preLaunchTask '{0}' terminated.", taskLabel));
93
79
  let DebugChoice;
94
- ( (function(DebugChoice) {
80
+ ( ((function(DebugChoice) {
95
81
  DebugChoice[DebugChoice["DebugAnyway"] = 1] = "DebugAnyway";
96
82
  DebugChoice[DebugChoice["ShowErrors"] = 2] = "ShowErrors";
97
83
  DebugChoice[DebugChoice["Cancel"] = 0] = "Cancel";
98
- })(DebugChoice || (DebugChoice = {})));
84
+ })(DebugChoice || (DebugChoice = {}))));
99
85
  const { result, checkboxChecked } = await this.dialogService.prompt({
100
86
  type: Severity$1.Warning,
101
87
  message,
102
88
  buttons: [
103
89
  {
104
- label: ( localizeWithPath(
105
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
106
- { key: 'debugAnyway', comment: ['&& denotes a mnemonic'] },
107
- "&&Debug Anyway"
108
- )),
90
+ label: ( localizeWithPath(_moduleId, 4, "&&Debug Anyway")),
109
91
  run: () => DebugChoice.DebugAnyway
110
92
  },
111
93
  {
112
- label: ( localizeWithPath(
113
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
114
- { key: 'showErrors', comment: ['&& denotes a mnemonic'] },
115
- "&&Show Errors"
116
- )),
94
+ label: ( localizeWithPath(_moduleId, 5, "&&Show Errors")),
117
95
  run: () => DebugChoice.ShowErrors
118
96
  }
119
97
  ],
120
98
  cancelButton: {
121
- label: ( localizeWithPath('vs/workbench/contrib/debug/browser/debugTaskRunner', 'abort', "Abort")),
99
+ label: ( localizeWithPath(_moduleId, 6, "Abort")),
122
100
  run: () => DebugChoice.Cancel
123
101
  },
124
102
  checkbox: {
125
- label: ( localizeWithPath(
126
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
127
- 'remember',
128
- "Remember my choice in user settings"
129
- )),
103
+ label: ( localizeWithPath(_moduleId, 7, "Remember my choice in user settings")),
130
104
  }
131
105
  });
132
106
  const debugAnyway = result === DebugChoice.DebugAnyway;
@@ -148,11 +122,11 @@ let DebugTaskRunner = class DebugTaskRunner {
148
122
  const choiceMap = JSON.parse(this.storageService.get(DEBUG_TASK_ERROR_CHOICE_KEY, 1 , '{}'));
149
123
  let choice = -1;
150
124
  let DebugChoice;
151
- ( (function(DebugChoice) {
125
+ ( ((function(DebugChoice) {
152
126
  DebugChoice[DebugChoice["DebugAnyway"] = 0] = "DebugAnyway";
153
127
  DebugChoice[DebugChoice["ConfigureTask"] = 1] = "ConfigureTask";
154
128
  DebugChoice[DebugChoice["Cancel"] = 2] = "Cancel";
155
- })(DebugChoice || (DebugChoice = {})));
129
+ })(DebugChoice || (DebugChoice = {}))));
156
130
  if (choiceMap[err.message] !== undefined) {
157
131
  choice = choiceMap[err.message];
158
132
  }
@@ -162,11 +136,7 @@ let DebugTaskRunner = class DebugTaskRunner {
162
136
  message: err.message,
163
137
  buttons: [
164
138
  {
165
- label: ( localizeWithPath(
166
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
167
- { key: 'debugAnyway', comment: ['&& denotes a mnemonic'] },
168
- "&&Debug Anyway"
169
- )),
139
+ label: ( localizeWithPath(_moduleId, 4, "&&Debug Anyway")),
170
140
  run: () => DebugChoice.DebugAnyway
171
141
  },
172
142
  {
@@ -178,11 +148,7 @@ let DebugTaskRunner = class DebugTaskRunner {
178
148
  run: () => DebugChoice.Cancel
179
149
  },
180
150
  checkbox: {
181
- label: ( localizeWithPath(
182
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
183
- 'rememberTask',
184
- "Remember my choice for this task"
185
- ))
151
+ label: ( localizeWithPath(_moduleId, 8, "Remember my choice for this task"))
186
152
  }
187
153
  });
188
154
  choice = result;
@@ -202,46 +168,37 @@ let DebugTaskRunner = class DebugTaskRunner {
202
168
  return Promise.resolve(null);
203
169
  }
204
170
  if (!root) {
205
- return Promise.reject(( new Error(( localizeWithPath(
206
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
207
- 'invalidTaskReference',
171
+ return Promise.reject(( (new Error(( localizeWithPath(
172
+ _moduleId,
173
+ 9,
208
174
  "Task '{0}' can not be referenced from a launch configuration that is in a different workspace folder.",
209
175
  typeof taskId === 'string' ? taskId : taskId.type
210
- )))));
176
+ ))))));
211
177
  }
212
178
  const task = await this.taskService.getTask(root, taskId);
213
179
  if (!task) {
214
180
  const errorMessage = typeof taskId === 'string'
215
- ? ( localizeWithPath(
216
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
217
- 'DebugTaskNotFoundWithTaskId',
218
- "Could not find the task '{0}'.",
219
- taskId
220
- ))
221
- : ( localizeWithPath(
222
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
223
- 'DebugTaskNotFound',
224
- "Could not find the specified task."
225
- ));
226
- return Promise.reject(createErrorWithActions(errorMessage, [( new Action(
181
+ ? ( localizeWithPath(_moduleId, 10, "Could not find the task '{0}'.", taskId))
182
+ : ( localizeWithPath(_moduleId, 11, "Could not find the specified task."));
183
+ return Promise.reject(createErrorWithActions(errorMessage, [( (new Action(
227
184
  DEBUG_CONFIGURE_COMMAND_ID,
228
185
  DEBUG_CONFIGURE_LABEL,
229
186
  undefined,
230
187
  true,
231
188
  () => this.commandService.executeCommand(DEBUG_CONFIGURE_COMMAND_ID)
232
- ))]));
189
+ )))]));
233
190
  }
234
191
  let taskStarted = false;
235
192
  const getTaskKey = (t) => t.getKey() ?? t.getMapKey();
236
193
  const taskKey = getTaskKey(task);
237
- const inactivePromise = ( new Promise((c) => once(e => {
194
+ const inactivePromise = ( (new Promise((c) => once(e => {
238
195
  return (e.kind === "inactive"
239
196
  || (e.kind === "processEnded" && e.exitCode === undefined))
240
197
  && getTaskKey(e.__task) === taskKey;
241
198
  }, this.taskService.onDidStateChange)(e => {
242
199
  taskStarted = true;
243
200
  c(e.kind === "processEnded" ? { exitCode: e.exitCode } : null);
244
- })));
201
+ }))));
245
202
  const promise = this.taskService.getActiveTasks().then(async (tasks) => {
246
203
  if (tasks.find(t => getTaskKey(t) === taskKey)) {
247
204
  const busyTasks = await this.taskService.getBusyTasks();
@@ -260,48 +217,50 @@ let DebugTaskRunner = class DebugTaskRunner {
260
217
  }
261
218
  return taskPromise.then(x => x ?? null);
262
219
  });
263
- return ( new Promise((c, e) => {
264
- const waitForInput = ( new Promise(
265
- resolve => once(e => ((e.kind === "acquiredInput") ) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
266
- resolve();
267
- })
268
- ));
269
- promise.then(result => {
270
- taskStarted = true;
271
- c(result);
272
- }, error => e(error));
273
- waitForInput.then(() => {
274
- const waitTime = task.configurationProperties.isBackground ? 5000 : 10000;
275
- setTimeout(() => {
276
- if (!taskStarted) {
277
- const errorMessage = typeof taskId === 'string'
278
- ? ( localizeWithPath(
279
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
280
- 'taskNotTrackedWithTaskId',
281
- "The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
282
- taskId
283
- ))
284
- : ( localizeWithPath(
285
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
286
- 'taskNotTracked',
287
- "The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
288
- JSON.stringify(taskId)
289
- ));
290
- e({ severity: Severity$1.Error, message: errorMessage });
291
- }
292
- }, waitTime);
293
- });
294
- }));
220
+ return (
221
+ (new Promise((c, e) => {
222
+ const waitForInput = ( (new Promise(
223
+ resolve => once(e => ((e.kind === "acquiredInput") ) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
224
+ resolve();
225
+ })
226
+ )));
227
+ promise.then(result => {
228
+ taskStarted = true;
229
+ c(result);
230
+ }, error => e(error));
231
+ waitForInput.then(() => {
232
+ const waitTime = task.configurationProperties.isBackground ? 5000 : 10000;
233
+ setTimeout(() => {
234
+ if (!taskStarted) {
235
+ const errorMessage = typeof taskId === 'string'
236
+ ? ( localizeWithPath(
237
+ _moduleId,
238
+ 12,
239
+ "The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
240
+ taskId
241
+ ))
242
+ : ( localizeWithPath(
243
+ _moduleId,
244
+ 13,
245
+ "The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
246
+ JSON.stringify(taskId)
247
+ ));
248
+ e({ severity: Severity$1.Error, message: errorMessage });
249
+ }
250
+ }, waitTime);
251
+ });
252
+ }))
253
+ );
295
254
  }
296
255
  };
297
- DebugTaskRunner = ( __decorate([
298
- ( __param(0, ITaskService)),
299
- ( __param(1, IMarkerService)),
300
- ( __param(2, IConfigurationService)),
301
- ( __param(3, IViewsService)),
302
- ( __param(4, IDialogService)),
303
- ( __param(5, IStorageService)),
304
- ( __param(6, ICommandService))
305
- ], DebugTaskRunner));
256
+ DebugTaskRunner = ( (__decorate([
257
+ ( (__param(0, ITaskService))),
258
+ ( (__param(1, IMarkerService))),
259
+ ( (__param(2, IConfigurationService))),
260
+ ( (__param(3, IViewsService))),
261
+ ( (__param(4, IDialogService))),
262
+ ( (__param(5, IStorageService))),
263
+ ( (__param(6, ICommandService)))
264
+ ], DebugTaskRunner)));
306
265
 
307
266
  export { DebugTaskRunner };
@@ -37,7 +37,7 @@ import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeServi
37
37
  import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
38
38
  import { FocusSessionActionViewItem } from './debugActionViewItems.js';
39
39
  import { debugToolBarBackground, debugToolBarBorder } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugColors';
40
- import { FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID, CONTINUE_ID, CONTINUE_LABEL, PAUSE_ID, PAUSE_LABEL, STOP_LABEL, DISCONNECT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_ID, STEP_INTO_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STEP_BACK_ID, REVERSE_CONTINUE_ID, FOCUS_SESSION_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL } from './debugCommands.js';
40
+ import { FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID, CONTINUE_ID, CONTINUE_LABEL, PAUSE_ID, PAUSE_LABEL, STOP_LABEL, DISCONNECT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_ID, STEP_INTO_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STEP_BACK_ID, REVERSE_CONTINUE_ID, FOCUS_SESSION_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
41
41
  import { debugGripper, debugContinue, debugPause, debugStop, debugDisconnect, debugStepOver, debugStepInto, debugStepOut, debugRestart, debugStepBack, debugReverseContinue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
42
42
  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 } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
43
43
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
@@ -47,6 +47,7 @@ import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
47
47
  import { clamp } from 'vscode/vscode/vs/base/common/numbers';
48
48
  import { PixelRatio } from 'vscode/vscode/vs/base/browser/pixelRatio';
49
49
 
50
+ const _moduleId = "vs/workbench/contrib/debug/browser/debugToolBar";
50
51
  const DEBUG_TOOLBAR_POSITION_KEY = 'debug.actionswidgetposition';
51
52
  const DEBUG_TOOLBAR_Y_KEY = 'debug.actionswidgety';
52
53
  let DebugToolBar = class DebugToolBar extends Themable {
@@ -59,12 +60,11 @@ let DebugToolBar = class DebugToolBar extends Themable {
59
60
  this.storageService = storageService;
60
61
  this.configurationService = configurationService;
61
62
  this.instantiationService = instantiationService;
62
- this.yCoordinate = 0;
63
63
  this.isVisible = false;
64
64
  this.isBuilt = false;
65
- this.stopActionViewItemDisposables = this._register(( new DisposableStore()));
66
- this.auxWindowCoordinates = ( new WeakMap());
67
- this.trackPixelRatioListener = this._register(( new MutableDisposable()));
65
+ this.stopActionViewItemDisposables = this._register(( (new DisposableStore())));
66
+ this.auxWindowCoordinates = ( (new WeakMap()));
67
+ this.trackPixelRatioListener = this._register(( (new MutableDisposable())));
68
68
  this.$el = $('div.debug-toolbar');
69
69
  this.$el.style.top = `${layoutService.mainContainerOffset.top}px`;
70
70
  this.dragArea = append(this.$el, $('div.drag-area' + ThemeIcon.asCSSSelector(debugGripper)));
@@ -72,7 +72,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
72
72
  this.debugToolBarMenu = menuService.createMenu(MenuId.DebugToolBar, contextKeyService);
73
73
  this._register(this.debugToolBarMenu);
74
74
  this.activeActions = [];
75
- this.actionBar = this._register(( new ActionBar(actionBarContainer, {
75
+ this.actionBar = this._register(( (new ActionBar(actionBarContainer, {
76
76
  orientation: 0 ,
77
77
  actionViewItemProvider: (action, options) => {
78
78
  if (action.id === FOCUS_SESSION_ID) {
@@ -87,8 +87,8 @@ let DebugToolBar = class DebugToolBar extends Themable {
87
87
  }
88
88
  return createActionViewItem(this.instantiationService, action, options);
89
89
  }
90
- })));
91
- this.updateScheduler = this._register(( new RunOnceScheduler(() => {
90
+ }))));
91
+ this.updateScheduler = this._register(( (new RunOnceScheduler(() => {
92
92
  const state = this.debugService.state;
93
93
  const toolBarLocation = this.configurationService.getValue('debug').toolBarLocation;
94
94
  if (state === 0 ||
@@ -105,7 +105,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
105
105
  this.activeActions = actions;
106
106
  }
107
107
  this.show();
108
- }, 20)));
108
+ }, 20))));
109
109
  this.updateStyles();
110
110
  this.registerListeners();
111
111
  this.hide();
@@ -118,7 +118,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
118
118
  }
119
119
  if (e.affectsConfiguration("workbench.editor.showTabs" ) || e.affectsConfiguration("window.commandCenter" )) {
120
120
  this._yRange = undefined;
121
- this.setYCoordinate();
121
+ this.setCoordinates();
122
122
  }
123
123
  }));
124
124
  this._register(this.debugToolBarMenu.onDidChange(() => this.updateScheduler.schedule()));
@@ -129,7 +129,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
129
129
  this.telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: 'debugActionsWidget' });
130
130
  }));
131
131
  this._register(addDisposableGenericMouseUpListener(this.dragArea, (event) => {
132
- const mouseClickEvent = ( new StandardMouseEvent(getWindow(this.dragArea), event));
132
+ const mouseClickEvent = ( (new StandardMouseEvent(getWindow(this.dragArea), event)));
133
133
  const activeWindow = getWindow(this.layoutService.activeContainer);
134
134
  if (mouseClickEvent.detail === 2) {
135
135
  const widgetWidth = this.$el.clientWidth;
@@ -141,7 +141,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
141
141
  this.dragArea.classList.add('dragged');
142
142
  const activeWindow = getWindow(this.layoutService.activeContainer);
143
143
  const mouseMoveListener = addDisposableGenericMouseMoveListener(activeWindow, (e) => {
144
- const mouseMoveEvent = ( new StandardMouseEvent(activeWindow, e));
144
+ const mouseMoveEvent = ( (new StandardMouseEvent(activeWindow, e)));
145
145
  mouseMoveEvent.preventDefault();
146
146
  this.setCoordinates(mouseMoveEvent.posx - 14, mouseMoveEvent.posy - 14);
147
147
  });
@@ -152,8 +152,11 @@ let DebugToolBar = class DebugToolBar extends Themable {
152
152
  mouseUpListener.dispose();
153
153
  });
154
154
  }));
155
- this._register(this.layoutService.onDidChangePartVisibility(() => this.setYCoordinate()));
156
- const resizeListener = this._register(( new MutableDisposable()));
155
+ this._register(this.layoutService.onDidChangePartVisibility(() => this.setCoordinates()));
156
+ const resizeListener = this._register(( (new MutableDisposable())));
157
+ const registerResizeListener = () => {
158
+ resizeListener.value = this._register(addDisposableListener(getWindow(this.layoutService.activeContainer), EventType.RESIZE, () => this.setCoordinates()));
159
+ };
157
160
  this._register(this.layoutService.onDidChangeActiveContainer(async () => {
158
161
  this._yRange = undefined;
159
162
  await this.layoutService.whenContainerStylesLoaded(getWindow(this.layoutService.activeContainer));
@@ -161,19 +164,22 @@ let DebugToolBar = class DebugToolBar extends Themable {
161
164
  this.doShowInActiveContainer();
162
165
  this.setCoordinates();
163
166
  }
164
- resizeListener.value = this._register(addDisposableListener(getWindow(this.layoutService.activeContainer), EventType.RESIZE, () => this.setYCoordinate()));
167
+ registerResizeListener();
165
168
  }));
169
+ registerResizeListener();
166
170
  }
167
171
  storePosition() {
168
172
  const activeWindow = getWindow(this.layoutService.activeContainer);
169
173
  const isMainWindow = this.layoutService.activeContainer === this.layoutService.mainContainer;
170
- const left = this.$el.getBoundingClientRect().left / activeWindow.innerWidth;
174
+ const rect = this.$el.getBoundingClientRect();
175
+ const y = rect.top;
176
+ const x = rect.left / activeWindow.innerWidth;
171
177
  if (isMainWindow) {
172
- this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, left, 0 , 1 );
173
- this.storageService.store(DEBUG_TOOLBAR_Y_KEY, this.yCoordinate, 0 , 1 );
178
+ this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, x, 0 , 1 );
179
+ this.storageService.store(DEBUG_TOOLBAR_Y_KEY, y, 0 , 1 );
174
180
  }
175
181
  else {
176
- this.auxWindowCoordinates.set(activeWindow, { x: left, y: this.yCoordinate });
182
+ this.auxWindowCoordinates.set(activeWindow, { x, y });
177
183
  }
178
184
  }
179
185
  updateStyles() {
@@ -217,11 +223,10 @@ let DebugToolBar = class DebugToolBar extends Themable {
217
223
  }
218
224
  this.setYCoordinate(y ?? this.yDefault);
219
225
  }
220
- setYCoordinate(y = this.yCoordinate) {
226
+ setYCoordinate(y) {
221
227
  const [yMin, yMax] = this.yRange;
222
228
  y = Math.max(yMin, Math.min(y, yMax));
223
229
  this.$el.style.top = `${y}px`;
224
- this.yCoordinate = y;
225
230
  }
226
231
  get yDefault() {
227
232
  return this.layoutService.mainContainerOffset.top;
@@ -261,7 +266,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
261
266
  }
262
267
  doShowInActiveContainer() {
263
268
  this.layoutService.activeContainer.appendChild(this.$el);
264
- this.trackPixelRatioListener.value = PixelRatio.getInstance(getWindow(this.$el)).onDidChange(() => this.setYCoordinate());
269
+ this.trackPixelRatioListener.value = PixelRatio.getInstance(getWindow(this.$el)).onDidChange(() => this.setCoordinates());
265
270
  }
266
271
  hide() {
267
272
  this.isVisible = false;
@@ -272,18 +277,18 @@ let DebugToolBar = class DebugToolBar extends Themable {
272
277
  this.$el?.remove();
273
278
  }
274
279
  };
275
- DebugToolBar = ( __decorate([
276
- ( __param(0, INotificationService)),
277
- ( __param(1, ITelemetryService)),
278
- ( __param(2, IDebugService)),
279
- ( __param(3, IWorkbenchLayoutService)),
280
- ( __param(4, IStorageService)),
281
- ( __param(5, IConfigurationService)),
282
- ( __param(6, IThemeService)),
283
- ( __param(7, IInstantiationService)),
284
- ( __param(8, IMenuService)),
285
- ( __param(9, IContextKeyService))
286
- ], DebugToolBar));
280
+ DebugToolBar = ( (__decorate([
281
+ ( (__param(0, INotificationService))),
282
+ ( (__param(1, ITelemetryService))),
283
+ ( (__param(2, IDebugService))),
284
+ ( (__param(3, IWorkbenchLayoutService))),
285
+ ( (__param(4, IStorageService))),
286
+ ( (__param(5, IConfigurationService))),
287
+ ( (__param(6, IThemeService))),
288
+ ( (__param(7, IInstantiationService))),
289
+ ( (__param(8, IMenuService))),
290
+ ( (__param(9, IContextKeyService)))
291
+ ], DebugToolBar)));
287
292
  function createDisconnectMenuItemAction(action, disposables, accessor, options) {
288
293
  const menuService = accessor.get(IMenuService);
289
294
  const contextKeyService = accessor.get(IContextKeyService);
@@ -295,11 +300,7 @@ function createDisconnectMenuItemAction(action, disposables, accessor, options)
295
300
  if (!secondary.length) {
296
301
  return undefined;
297
302
  }
298
- const dropdownAction = disposables.add(( new Action('notebook.moreRunActions', ( localizeWithPath(
299
- 'vs/workbench/contrib/debug/browser/debugToolBar',
300
- 'notebook.moreRunActionsLabel',
301
- "More..."
302
- )), 'codicon-chevron-down', true)));
303
+ const dropdownAction = disposables.add(( (new Action('notebook.moreRunActions', ( localizeWithPath(_moduleId, 0, "More...")), 'codicon-chevron-down', true))));
303
304
  const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, secondary, 'debug-stop-actions', contextMenuService, options);
304
305
  return item;
305
306
  }
@@ -319,7 +320,12 @@ const registerDebugToolBarItem = (id, title, order, icon, when, precondition, al
319
320
  });
320
321
  debugViewTitleItems.push(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
321
322
  group: 'navigation',
322
- when: ( ContextKeyExpr.and(when, ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked')))),
323
+ when: ( (ContextKeyExpr.and(
324
+ when,
325
+ (ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
326
+ (CONTEXT_DEBUG_STATE.notEqualsTo('inactive')),
327
+ (ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked'))
328
+ ))),
323
329
  order,
324
330
  command: {
325
331
  id,
@@ -330,47 +336,56 @@ const registerDebugToolBarItem = (id, title, order, icon, when, precondition, al
330
336
  }));
331
337
  };
332
338
  MenuRegistry.onDidChangeMenu(e => {
333
- if (( e.has(MenuId.DebugToolBar))) {
339
+ if (( (e.has(MenuId.DebugToolBar)))) {
334
340
  dispose(debugViewTitleItems);
335
341
  const items = MenuRegistry.getMenuItems(MenuId.DebugToolBar);
336
342
  for (const i of items) {
337
343
  debugViewTitleItems.push(MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
338
344
  ...i,
339
- when: ( ContextKeyExpr.and(i.when, ( ContextKeyExpr.equals('viewContainer', VIEWLET_ID)), ( CONTEXT_DEBUG_STATE.notEqualsTo('inactive')), ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked'))))
345
+ when: ( (ContextKeyExpr.and(
346
+ i.when,
347
+ (ContextKeyExpr.equals('viewContainer', VIEWLET_ID)),
348
+ (CONTEXT_DEBUG_STATE.notEqualsTo('inactive')),
349
+ (ContextKeyExpr.equals('config.debug.toolBarLocation', 'docked'))
350
+ )))
340
351
  }));
341
352
  }
342
353
  }
343
354
  });
344
- const CONTEXT_TOOLBAR_COMMAND_CENTER = ( ContextKeyExpr.equals('config.debug.toolBarLocation', 'commandCenter'));
355
+ const CONTEXT_TOOLBAR_COMMAND_CENTER = ( (ContextKeyExpr.equals('config.debug.toolBarLocation', 'commandCenter')));
345
356
  MenuRegistry.appendMenuItem(MenuId.CommandCenterCenter, {
346
357
  submenu: MenuId.DebugToolBar,
347
358
  title: 'Debug',
348
359
  icon: Codicon.debug,
349
360
  order: 1,
350
- when: ( ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_TOOLBAR_COMMAND_CENTER))
361
+ when: ( (ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_TOOLBAR_COMMAND_CENTER)))
351
362
  });
352
- registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, debugContinue, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
353
- 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()))));
354
- 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)), });
355
- 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)), });
356
- registerDebugToolBarItem(STEP_OVER_ID, STEP_OVER_LABEL, 20, debugStepOver, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
357
- registerDebugToolBarItem(STEP_INTO_ID, STEP_INTO_LABEL, 30, debugStepInto, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
358
- registerDebugToolBarItem(STEP_OUT_ID, STEP_OUT_LABEL, 40, debugStepOut, undefined, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
363
+ registerDebugToolBarItem(CONTINUE_ID, CONTINUE_LABEL, 10, debugContinue, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
364
+ registerDebugToolBarItem(PAUSE_ID, PAUSE_LABEL, 10, debugPause, ( (CONTEXT_DEBUG_STATE.notEqualsTo('stopped'))), ( (ContextKeyExpr.and(
365
+ (CONTEXT_DEBUG_STATE.isEqualTo('running')),
366
+ (CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG.toNegated())
367
+ ))));
368
+ 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(
369
+ (CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()),
370
+ CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED
371
+ ))), });
372
+ 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))), });
373
+ registerDebugToolBarItem(STEP_OVER_ID, STEP_OVER_LABEL, 20, debugStepOver, undefined, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
374
+ registerDebugToolBarItem(STEP_INTO_ID, STEP_INTO_LABEL, 30, debugStepInto, undefined, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
375
+ registerDebugToolBarItem(STEP_OUT_ID, STEP_OUT_LABEL, 40, debugStepOut, undefined, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
359
376
  registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, 60, debugRestart);
360
- registerDebugToolBarItem(STEP_BACK_ID, ( localizeWithPath(
361
- 'vs/workbench/contrib/debug/browser/debugToolBar',
362
- 'stepBackDebug',
363
- "Step Back"
364
- )), 50, debugStepBack, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
365
- registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localizeWithPath(
366
- 'vs/workbench/contrib/debug/browser/debugToolBar',
367
- 'reverseContinue',
368
- "Reverse"
369
- )), 55, debugReverseContinue, CONTEXT_STEP_BACK_SUPPORTED, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
370
- registerDebugToolBarItem(FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, 100, Codicon.listTree, ( ContextKeyExpr.and(CONTEXT_MULTI_SESSION_DEBUG, ( CONTEXT_TOOLBAR_COMMAND_CENTER.negate()))));
377
+ registerDebugToolBarItem(STEP_BACK_ID, ( localizeWithPath(_moduleId, 1, "Step Back")), 50, debugStepBack, CONTEXT_STEP_BACK_SUPPORTED, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
378
+ registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localizeWithPath(_moduleId, 2, "Reverse")), 55, debugReverseContinue, CONTEXT_STEP_BACK_SUPPORTED, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
379
+ registerDebugToolBarItem(FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, 100, Codicon.listTree, ( (ContextKeyExpr.and(
380
+ CONTEXT_MULTI_SESSION_DEBUG,
381
+ (CONTEXT_TOOLBAR_COMMAND_CENTER.negate())
382
+ ))));
371
383
  MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
372
384
  group: 'navigation',
373
- when: ( ContextKeyExpr.and(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
385
+ when: ( (ContextKeyExpr.and(
386
+ (CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()),
387
+ CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED
388
+ ))),
374
389
  order: 0,
375
390
  command: {
376
391
  id: DISCONNECT_ID,
@@ -380,7 +395,7 @@ MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
380
395
  });
381
396
  MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
382
397
  group: 'navigation',
383
- when: ( ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)),
398
+ when: ( (ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED))),
384
399
  order: 0,
385
400
  command: {
386
401
  id: STOP_ID,
@@ -390,7 +405,11 @@ MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
390
405
  });
391
406
  MenuRegistry.appendMenuItem(MenuId.DebugToolBarStop, {
392
407
  group: 'navigation',
393
- 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)))),
408
+ when: ( (ContextKeyExpr.or( (ContextKeyExpr.and(
409
+ (CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()),
410
+ CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED,
411
+ CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED
412
+ )), (ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED))))),
394
413
  order: 0,
395
414
  command: {
396
415
  id: DISCONNECT_AND_SUSPEND_ID,