@theia/debug 1.67.0-next.86 → 1.68.0-next.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 (95) hide show
  1. package/lib/browser/breakpoint/breakpoint-manager.js +1 -1
  2. package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -1
  3. package/lib/browser/debug-commands.d.ts +153 -0
  4. package/lib/browser/debug-commands.d.ts.map +1 -0
  5. package/lib/browser/debug-commands.js +399 -0
  6. package/lib/browser/debug-commands.js.map +1 -0
  7. package/lib/browser/debug-frontend-application-contribution.d.ts +1 -150
  8. package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -1
  9. package/lib/browser/debug-frontend-application-contribution.js +155 -532
  10. package/lib/browser/debug-frontend-application-contribution.js.map +1 -1
  11. package/lib/browser/debug-prefix-configuration.js +3 -3
  12. package/lib/browser/debug-prefix-configuration.js.map +1 -1
  13. package/lib/browser/debug-session-contribution.d.ts +2 -1
  14. package/lib/browser/debug-session-contribution.d.ts.map +1 -1
  15. package/lib/browser/debug-session-contribution.js +5 -1
  16. package/lib/browser/debug-session-contribution.js.map +1 -1
  17. package/lib/browser/debug-session-manager.d.ts +4 -3
  18. package/lib/browser/debug-session-manager.d.ts.map +1 -1
  19. package/lib/browser/debug-session-manager.js +46 -8
  20. package/lib/browser/debug-session-manager.js.map +1 -1
  21. package/lib/browser/debug-session.d.ts +3 -2
  22. package/lib/browser/debug-session.d.ts.map +1 -1
  23. package/lib/browser/debug-session.js +4 -3
  24. package/lib/browser/debug-session.js.map +1 -1
  25. package/lib/browser/model/debug-breakpoint.d.ts +4 -2
  26. package/lib/browser/model/debug-breakpoint.d.ts.map +1 -1
  27. package/lib/browser/model/debug-breakpoint.js +10 -2
  28. package/lib/browser/model/debug-breakpoint.js.map +1 -1
  29. package/lib/browser/model/debug-data-breakpoint.d.ts +2 -0
  30. package/lib/browser/model/debug-data-breakpoint.d.ts.map +1 -1
  31. package/lib/browser/model/debug-data-breakpoint.js +16 -5
  32. package/lib/browser/model/debug-data-breakpoint.js.map +1 -1
  33. package/lib/browser/model/debug-function-breakpoint.d.ts +3 -0
  34. package/lib/browser/model/debug-function-breakpoint.d.ts.map +1 -1
  35. package/lib/browser/model/debug-function-breakpoint.js +17 -1
  36. package/lib/browser/model/debug-function-breakpoint.js.map +1 -1
  37. package/lib/browser/model/debug-instruction-breakpoint.d.ts +2 -0
  38. package/lib/browser/model/debug-instruction-breakpoint.d.ts.map +1 -1
  39. package/lib/browser/model/debug-instruction-breakpoint.js +13 -1
  40. package/lib/browser/model/debug-instruction-breakpoint.js.map +1 -1
  41. package/lib/browser/model/debug-source-breakpoint.d.ts +6 -1
  42. package/lib/browser/model/debug-source-breakpoint.d.ts.map +1 -1
  43. package/lib/browser/model/debug-source-breakpoint.js +17 -1
  44. package/lib/browser/model/debug-source-breakpoint.js.map +1 -1
  45. package/lib/browser/view/debug-action.d.ts +1 -0
  46. package/lib/browser/view/debug-action.d.ts.map +1 -1
  47. package/lib/browser/view/debug-action.js +2 -2
  48. package/lib/browser/view/debug-action.js.map +1 -1
  49. package/lib/browser/view/debug-breakpoints-source.d.ts +2 -0
  50. package/lib/browser/view/debug-breakpoints-source.d.ts.map +1 -1
  51. package/lib/browser/view/debug-breakpoints-source.js +6 -1
  52. package/lib/browser/view/debug-breakpoints-source.js.map +1 -1
  53. package/lib/browser/view/debug-configuration-widget.js +2 -2
  54. package/lib/browser/view/debug-configuration-widget.js.map +1 -1
  55. package/lib/browser/view/debug-exception-breakpoint.d.ts +9 -2
  56. package/lib/browser/view/debug-exception-breakpoint.d.ts.map +1 -1
  57. package/lib/browser/view/debug-exception-breakpoint.js +26 -5
  58. package/lib/browser/view/debug-exception-breakpoint.js.map +1 -1
  59. package/lib/browser/view/debug-session-widget.d.ts +0 -1
  60. package/lib/browser/view/debug-session-widget.d.ts.map +1 -1
  61. package/lib/browser/view/debug-session-widget.js +0 -4
  62. package/lib/browser/view/debug-session-widget.js.map +1 -1
  63. package/lib/browser/view/debug-threads-widget.d.ts +6 -1
  64. package/lib/browser/view/debug-threads-widget.d.ts.map +1 -1
  65. package/lib/browser/view/debug-threads-widget.js +69 -5
  66. package/lib/browser/view/debug-threads-widget.js.map +1 -1
  67. package/lib/browser/view/debug-toolbar-widget.d.ts +5 -18
  68. package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -1
  69. package/lib/browser/view/debug-toolbar-widget.js +14 -58
  70. package/lib/browser/view/debug-toolbar-widget.js.map +1 -1
  71. package/lib/browser/view/debug-view-model.d.ts.map +1 -1
  72. package/lib/browser/view/debug-view-model.js +8 -9
  73. package/lib/browser/view/debug-view-model.js.map +1 -1
  74. package/package.json +16 -16
  75. package/src/browser/breakpoint/breakpoint-manager.ts +1 -1
  76. package/src/browser/debug-commands.ts +402 -0
  77. package/src/browser/debug-frontend-application-contribution.ts +35 -410
  78. package/src/browser/debug-prefix-configuration.ts +1 -1
  79. package/src/browser/debug-session-contribution.ts +5 -2
  80. package/src/browser/debug-session-manager.ts +52 -9
  81. package/src/browser/debug-session.tsx +4 -3
  82. package/src/browser/model/debug-breakpoint.tsx +12 -3
  83. package/src/browser/model/debug-data-breakpoint.tsx +21 -6
  84. package/src/browser/model/debug-function-breakpoint.tsx +22 -1
  85. package/src/browser/model/debug-instruction-breakpoint.tsx +16 -1
  86. package/src/browser/model/debug-source-breakpoint.tsx +24 -3
  87. package/src/browser/style/index.css +13 -5
  88. package/src/browser/view/debug-action.tsx +3 -2
  89. package/src/browser/view/debug-breakpoints-source.tsx +5 -1
  90. package/src/browser/view/debug-configuration-widget.tsx +1 -1
  91. package/src/browser/view/debug-exception-breakpoint.tsx +30 -5
  92. package/src/browser/view/debug-session-widget.ts +0 -5
  93. package/src/browser/view/debug-threads-widget.ts +84 -6
  94. package/src/browser/view/debug-toolbar-widget.tsx +13 -60
  95. package/src/browser/view/debug-view-model.ts +8 -9
@@ -15,7 +15,7 @@
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.DebugFrontendApplicationContribution = exports.DebugBreakpointWidgetCommands = exports.DebugEditorContextCommands = exports.DebugSessionContextCommands = exports.DebugThreadContextCommands = exports.DebugCommands = exports.DebugMenus = void 0;
18
+ exports.DebugFrontendApplicationContribution = void 0;
19
19
  const tslib_1 = require("tslib");
20
20
  const browser_1 = require("@theia/core/lib/browser");
21
21
  const source_tree_1 = require("@theia/core/lib/browser/source-tree");
@@ -59,379 +59,7 @@ const console_contribution_1 = require("@theia/console/lib/browser/console-contr
59
59
  const debug_hover_widget_1 = require("./editor/debug-hover-widget");
60
60
  const debug_expression_provider_1 = require("./editor/debug-expression-provider");
61
61
  const debug_data_breakpoint_actions_1 = require("./breakpoint/debug-data-breakpoint-actions");
62
- var DebugMenus;
63
- (function (DebugMenus) {
64
- DebugMenus.DEBUG = [...common_1.MAIN_MENU_BAR, '6_debug'];
65
- DebugMenus.DEBUG_CONTROLS = [...DebugMenus.DEBUG, 'a_controls'];
66
- DebugMenus.DEBUG_CONFIGURATION = [...DebugMenus.DEBUG, 'b_configuration'];
67
- DebugMenus.DEBUG_THREADS = [...DebugMenus.DEBUG, 'c_threads'];
68
- DebugMenus.DEBUG_SESSIONS = [...DebugMenus.DEBUG, 'd_sessions'];
69
- DebugMenus.DEBUG_BREAKPOINT = [...DebugMenus.DEBUG, 'e_breakpoint'];
70
- DebugMenus.DEBUG_NEW_BREAKPOINT = [...DebugMenus.DEBUG_BREAKPOINT, 'a_new_breakpoint'];
71
- DebugMenus.DEBUG_BREAKPOINTS = [...DebugMenus.DEBUG, 'f_breakpoints'];
72
- })(DebugMenus || (exports.DebugMenus = DebugMenus = {}));
73
- function nlsEditBreakpoint(breakpoint) {
74
- return nls_1.nls.localizeByDefault('Edit {0}...', nls_1.nls.localizeByDefault(breakpoint));
75
- }
76
- function nlsRemoveBreakpoint(breakpoint) {
77
- return nls_1.nls.localizeByDefault('Remove {0}', nls_1.nls.localizeByDefault(breakpoint));
78
- }
79
- function nlsEnableBreakpoint(breakpoint) {
80
- return nls_1.nls.localizeByDefault('Enable {0}', nls_1.nls.localizeByDefault(breakpoint));
81
- }
82
- function nlsDisableBreakpoint(breakpoint) {
83
- return nls_1.nls.localizeByDefault('Disable {0}', nls_1.nls.localizeByDefault(breakpoint));
84
- }
85
- var DebugCommands;
86
- (function (DebugCommands) {
87
- DebugCommands.DEBUG_CATEGORY = 'Debug';
88
- DebugCommands.DEBUG_CATEGORY_KEY = nls_1.nls.getDefaultKey(DebugCommands.DEBUG_CATEGORY);
89
- DebugCommands.START = common_1.Command.toDefaultLocalizedCommand({
90
- id: 'workbench.action.debug.start',
91
- category: DebugCommands.DEBUG_CATEGORY,
92
- label: 'Start Debugging',
93
- iconClass: (0, browser_1.codicon)('debug-alt')
94
- });
95
- DebugCommands.START_NO_DEBUG = common_1.Command.toDefaultLocalizedCommand({
96
- id: 'workbench.action.debug.run',
97
- category: DebugCommands.DEBUG_CATEGORY,
98
- label: 'Start Without Debugging'
99
- });
100
- DebugCommands.STOP = common_1.Command.toDefaultLocalizedCommand({
101
- id: 'workbench.action.debug.stop',
102
- category: DebugCommands.DEBUG_CATEGORY,
103
- label: 'Stop',
104
- iconClass: (0, browser_1.codicon)('debug-stop')
105
- });
106
- DebugCommands.RESTART = common_1.Command.toDefaultLocalizedCommand({
107
- id: 'workbench.action.debug.restart',
108
- category: DebugCommands.DEBUG_CATEGORY,
109
- label: 'Restart',
110
- });
111
- DebugCommands.OPEN_CONFIGURATIONS = common_1.Command.toDefaultLocalizedCommand({
112
- id: 'debug.configurations.open',
113
- category: DebugCommands.DEBUG_CATEGORY,
114
- label: 'Open Configurations'
115
- });
116
- DebugCommands.ADD_CONFIGURATION = common_1.Command.toDefaultLocalizedCommand({
117
- id: 'debug.configurations.add',
118
- category: DebugCommands.DEBUG_CATEGORY,
119
- label: 'Add Configuration...'
120
- });
121
- DebugCommands.STEP_OVER = common_1.Command.toDefaultLocalizedCommand({
122
- id: 'workbench.action.debug.stepOver',
123
- category: DebugCommands.DEBUG_CATEGORY,
124
- label: 'Step Over',
125
- iconClass: (0, browser_1.codicon)('debug-step-over')
126
- });
127
- DebugCommands.STEP_INTO = common_1.Command.toDefaultLocalizedCommand({
128
- id: 'workbench.action.debug.stepInto',
129
- category: DebugCommands.DEBUG_CATEGORY,
130
- label: 'Step Into',
131
- iconClass: (0, browser_1.codicon)('debug-step-into')
132
- });
133
- DebugCommands.STEP_OUT = common_1.Command.toDefaultLocalizedCommand({
134
- id: 'workbench.action.debug.stepOut',
135
- category: DebugCommands.DEBUG_CATEGORY,
136
- label: 'Step Out',
137
- iconClass: (0, browser_1.codicon)('debug-step-out')
138
- });
139
- DebugCommands.CONTINUE = common_1.Command.toDefaultLocalizedCommand({
140
- id: 'workbench.action.debug.continue',
141
- category: DebugCommands.DEBUG_CATEGORY,
142
- label: 'Continue',
143
- iconClass: (0, browser_1.codicon)('debug-continue')
144
- });
145
- DebugCommands.PAUSE = common_1.Command.toDefaultLocalizedCommand({
146
- id: 'workbench.action.debug.pause',
147
- category: DebugCommands.DEBUG_CATEGORY,
148
- label: 'Pause',
149
- iconClass: (0, browser_1.codicon)('debug-pause')
150
- });
151
- DebugCommands.CONTINUE_ALL = common_1.Command.toLocalizedCommand({
152
- id: 'debug.thread.continue.all',
153
- category: DebugCommands.DEBUG_CATEGORY,
154
- label: 'Continue All',
155
- iconClass: (0, browser_1.codicon)('debug-continue')
156
- }, 'theia/debug/continueAll', DebugCommands.DEBUG_CATEGORY_KEY);
157
- DebugCommands.PAUSE_ALL = common_1.Command.toLocalizedCommand({
158
- id: 'debug.thread.pause.all',
159
- category: DebugCommands.DEBUG_CATEGORY,
160
- label: 'Pause All',
161
- iconClass: (0, browser_1.codicon)('debug-pause')
162
- }, 'theia/debug/pauseAll', DebugCommands.DEBUG_CATEGORY_KEY);
163
- DebugCommands.TOGGLE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
164
- id: 'editor.debug.action.toggleBreakpoint',
165
- category: DebugCommands.DEBUG_CATEGORY,
166
- label: 'Toggle Breakpoint',
167
- });
168
- DebugCommands.INLINE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
169
- id: 'editor.debug.action.inlineBreakpoint',
170
- category: DebugCommands.DEBUG_CATEGORY,
171
- label: 'Inline Breakpoint',
172
- });
173
- DebugCommands.ADD_CONDITIONAL_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
174
- id: 'debug.breakpoint.add.conditional',
175
- category: DebugCommands.DEBUG_CATEGORY,
176
- label: 'Add Conditional Breakpoint...',
177
- });
178
- DebugCommands.ADD_LOGPOINT = common_1.Command.toDefaultLocalizedCommand({
179
- id: 'debug.breakpoint.add.logpoint',
180
- category: DebugCommands.DEBUG_CATEGORY,
181
- label: 'Add Logpoint...',
182
- });
183
- DebugCommands.ADD_FUNCTION_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
184
- id: 'debug.breakpoint.add.function',
185
- category: DebugCommands.DEBUG_CATEGORY,
186
- label: 'Add Function Breakpoint',
187
- });
188
- DebugCommands.ADD_DATA_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
189
- id: 'debug.breakpoint.add.data',
190
- category: DebugCommands.DEBUG_CATEGORY,
191
- label: 'Add Data Breakpoint at Address'
192
- });
193
- DebugCommands.ENABLE_SELECTED_BREAKPOINTS = common_1.Command.toLocalizedCommand({
194
- id: 'debug.breakpoint.enableSelected',
195
- category: DebugCommands.DEBUG_CATEGORY,
196
- label: 'Enable Selected Breakpoints',
197
- }, 'theia/debug/enableSelectedBreakpoints', DebugCommands.DEBUG_CATEGORY_KEY);
198
- DebugCommands.ENABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
199
- id: 'debug.breakpoint.enableAll',
200
- category: DebugCommands.DEBUG_CATEGORY,
201
- label: 'Enable All Breakpoints',
202
- });
203
- DebugCommands.DISABLE_SELECTED_BREAKPOINTS = common_1.Command.toLocalizedCommand({
204
- id: 'debug.breakpoint.disableSelected',
205
- category: DebugCommands.DEBUG_CATEGORY,
206
- label: 'Disable Selected Breakpoints',
207
- }, 'theia/debug/disableSelectedBreakpoints', DebugCommands.DEBUG_CATEGORY_KEY);
208
- DebugCommands.DISABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
209
- id: 'debug.breakpoint.disableAll',
210
- category: DebugCommands.DEBUG_CATEGORY,
211
- label: 'Disable All Breakpoints',
212
- });
213
- DebugCommands.EDIT_BREAKPOINT = common_1.Command.toLocalizedCommand({
214
- id: 'debug.breakpoint.edit',
215
- category: DebugCommands.DEBUG_CATEGORY,
216
- originalLabel: 'Edit Breakpoint...',
217
- label: nlsEditBreakpoint('Breakpoint')
218
- }, '', DebugCommands.DEBUG_CATEGORY_KEY);
219
- DebugCommands.EDIT_LOGPOINT = common_1.Command.toLocalizedCommand({
220
- id: 'debug.logpoint.edit',
221
- category: DebugCommands.DEBUG_CATEGORY,
222
- originalLabel: 'Edit Logpoint...',
223
- label: nlsEditBreakpoint('Logpoint')
224
- }, '', DebugCommands.DEBUG_CATEGORY_KEY);
225
- DebugCommands.EDIT_BREAKPOINT_CONDITION = common_1.Command.toLocalizedCommand({
226
- id: 'debug.breakpoint.editCondition',
227
- category: DebugCommands.DEBUG_CATEGORY,
228
- label: 'Edit Condition...'
229
- }, '', DebugCommands.DEBUG_CATEGORY_KEY);
230
- DebugCommands.REMOVE_BREAKPOINT = common_1.Command.toLocalizedCommand({
231
- id: 'debug.breakpoint.remove',
232
- category: DebugCommands.DEBUG_CATEGORY,
233
- originalLabel: 'Remove Breakpoint',
234
- label: nlsRemoveBreakpoint('Breakpoint')
235
- }, '', DebugCommands.DEBUG_CATEGORY_KEY);
236
- DebugCommands.REMOVE_LOGPOINT = common_1.Command.toLocalizedCommand({
237
- id: 'debug.logpoint.remove',
238
- category: DebugCommands.DEBUG_CATEGORY,
239
- originalLabel: 'Remove Logpoint',
240
- label: nlsRemoveBreakpoint('Logpoint')
241
- }, '', DebugCommands.DEBUG_CATEGORY_KEY);
242
- DebugCommands.REMOVE_SELECTED_BREAKPOINTS = common_1.Command.toLocalizedCommand({
243
- id: 'debug.breakpoint.removeSelected',
244
- category: DebugCommands.DEBUG_CATEGORY,
245
- label: 'Remove Selected Breakpoints',
246
- }, '', DebugCommands.DEBUG_CATEGORY_KEY);
247
- DebugCommands.REMOVE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
248
- id: 'debug.breakpoint.removeAll',
249
- category: DebugCommands.DEBUG_CATEGORY,
250
- label: 'Remove All Breakpoints',
251
- });
252
- DebugCommands.TOGGLE_BREAKPOINTS_ENABLED = common_1.Command.toLocalizedCommand({
253
- id: 'debug.breakpoint.toggleEnabled'
254
- });
255
- DebugCommands.SHOW_HOVER = common_1.Command.toDefaultLocalizedCommand({
256
- id: 'editor.debug.action.showDebugHover',
257
- label: 'Debug: Show Hover'
258
- });
259
- DebugCommands.EVALUATE_IN_DEBUG_CONSOLE = common_1.Command.toDefaultLocalizedCommand({
260
- id: 'editor.debug.action.selectionToRepl',
261
- category: DebugCommands.DEBUG_CATEGORY,
262
- label: 'Evaluate in Debug Console'
263
- });
264
- DebugCommands.ADD_TO_WATCH = common_1.Command.toDefaultLocalizedCommand({
265
- id: 'editor.debug.action.selectionToWatch',
266
- category: DebugCommands.DEBUG_CATEGORY,
267
- label: 'Add to Watch'
268
- });
269
- DebugCommands.JUMP_TO_CURSOR = common_1.Command.toDefaultLocalizedCommand({
270
- id: 'editor.debug.action.jumpToCursor',
271
- category: DebugCommands.DEBUG_CATEGORY,
272
- label: 'Jump to Cursor'
273
- });
274
- DebugCommands.RUN_TO_CURSOR = common_1.Command.toDefaultLocalizedCommand({
275
- id: 'editor.debug.action.runToCursor',
276
- category: DebugCommands.DEBUG_CATEGORY,
277
- label: 'Run to Cursor'
278
- });
279
- DebugCommands.RUN_TO_LINE = common_1.Command.toDefaultLocalizedCommand({
280
- id: 'editor.debug.action.runToLine',
281
- category: DebugCommands.DEBUG_CATEGORY,
282
- label: 'Run to Line'
283
- });
284
- DebugCommands.RESTART_FRAME = common_1.Command.toDefaultLocalizedCommand({
285
- id: 'debug.frame.restart',
286
- category: DebugCommands.DEBUG_CATEGORY,
287
- label: 'Restart Frame',
288
- });
289
- DebugCommands.COPY_CALL_STACK = common_1.Command.toDefaultLocalizedCommand({
290
- id: 'debug.callStack.copy',
291
- category: DebugCommands.DEBUG_CATEGORY,
292
- label: 'Copy Call Stack',
293
- });
294
- DebugCommands.SET_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
295
- id: 'debug.variable.setValue',
296
- category: DebugCommands.DEBUG_CATEGORY,
297
- label: 'Set Value',
298
- });
299
- DebugCommands.COPY_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
300
- id: 'debug.variable.copyValue',
301
- category: DebugCommands.DEBUG_CATEGORY,
302
- label: 'Copy Value',
303
- });
304
- DebugCommands.COPY_VARIABLE_AS_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
305
- id: 'debug.variable.copyAsExpression',
306
- category: DebugCommands.DEBUG_CATEGORY,
307
- label: 'Copy as Expression',
308
- });
309
- DebugCommands.WATCH_VARIABLE = common_1.Command.toDefaultLocalizedCommand({
310
- id: 'debug.variable.watch',
311
- category: DebugCommands.DEBUG_CATEGORY,
312
- label: 'Add to Watch',
313
- });
314
- DebugCommands.ADD_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
315
- id: 'debug.watch.addExpression',
316
- category: DebugCommands.DEBUG_CATEGORY,
317
- label: 'Add Expression'
318
- });
319
- DebugCommands.EDIT_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
320
- id: 'debug.watch.editExpression',
321
- category: DebugCommands.DEBUG_CATEGORY,
322
- label: 'Edit Expression'
323
- });
324
- DebugCommands.COPY_WATCH_EXPRESSION_VALUE = common_1.Command.toLocalizedCommand({
325
- id: 'debug.watch.copyExpressionValue',
326
- category: DebugCommands.DEBUG_CATEGORY,
327
- label: 'Copy Expression Value'
328
- }, 'theia/debug/copyExpressionValue', DebugCommands.DEBUG_CATEGORY_KEY);
329
- DebugCommands.REMOVE_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
330
- id: 'debug.watch.removeExpression',
331
- category: DebugCommands.DEBUG_CATEGORY,
332
- label: 'Remove Expression'
333
- });
334
- DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
335
- id: 'debug.watch.collapseAllExpressions',
336
- category: DebugCommands.DEBUG_CATEGORY,
337
- label: 'Collapse All'
338
- });
339
- DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
340
- id: 'debug.watch.removeAllExpressions',
341
- category: DebugCommands.DEBUG_CATEGORY,
342
- label: 'Remove All Expressions'
343
- });
344
- })(DebugCommands || (exports.DebugCommands = DebugCommands = {}));
345
- var DebugThreadContextCommands;
346
- (function (DebugThreadContextCommands) {
347
- DebugThreadContextCommands.STEP_OVER = {
348
- id: 'debug.thread.context.context.next'
349
- };
350
- DebugThreadContextCommands.STEP_INTO = {
351
- id: 'debug.thread.context.stepin'
352
- };
353
- DebugThreadContextCommands.STEP_OUT = {
354
- id: 'debug.thread.context.stepout'
355
- };
356
- DebugThreadContextCommands.CONTINUE = {
357
- id: 'debug.thread.context.continue'
358
- };
359
- DebugThreadContextCommands.PAUSE = {
360
- id: 'debug.thread.context.pause'
361
- };
362
- DebugThreadContextCommands.TERMINATE = {
363
- id: 'debug.thread.context.terminate'
364
- };
365
- })(DebugThreadContextCommands || (exports.DebugThreadContextCommands = DebugThreadContextCommands = {}));
366
- var DebugSessionContextCommands;
367
- (function (DebugSessionContextCommands) {
368
- DebugSessionContextCommands.STOP = {
369
- id: 'debug.session.context.stop'
370
- };
371
- DebugSessionContextCommands.RESTART = {
372
- id: 'debug.session.context.restart'
373
- };
374
- DebugSessionContextCommands.PAUSE_ALL = {
375
- id: 'debug.session.context.pauseAll'
376
- };
377
- DebugSessionContextCommands.CONTINUE_ALL = {
378
- id: 'debug.session.context.continueAll'
379
- };
380
- DebugSessionContextCommands.REVEAL = {
381
- id: 'debug.session.context.reveal'
382
- };
383
- })(DebugSessionContextCommands || (exports.DebugSessionContextCommands = DebugSessionContextCommands = {}));
384
- var DebugEditorContextCommands;
385
- (function (DebugEditorContextCommands) {
386
- DebugEditorContextCommands.ADD_BREAKPOINT = {
387
- id: 'debug.editor.context.addBreakpoint'
388
- };
389
- DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT = {
390
- id: 'debug.editor.context.addBreakpoint.conditional'
391
- };
392
- DebugEditorContextCommands.ADD_LOGPOINT = {
393
- id: 'debug.editor.context.add.logpoint'
394
- };
395
- DebugEditorContextCommands.REMOVE_BREAKPOINT = {
396
- id: 'debug.editor.context.removeBreakpoint'
397
- };
398
- DebugEditorContextCommands.EDIT_BREAKPOINT = {
399
- id: 'debug.editor.context.edit.breakpoint'
400
- };
401
- DebugEditorContextCommands.ENABLE_BREAKPOINT = {
402
- id: 'debug.editor.context.enableBreakpoint'
403
- };
404
- DebugEditorContextCommands.DISABLE_BREAKPOINT = {
405
- id: 'debug.editor.context.disableBreakpoint'
406
- };
407
- DebugEditorContextCommands.REMOVE_LOGPOINT = {
408
- id: 'debug.editor.context.logpoint.remove'
409
- };
410
- DebugEditorContextCommands.EDIT_LOGPOINT = {
411
- id: 'debug.editor.context.logpoint.edit'
412
- };
413
- DebugEditorContextCommands.ENABLE_LOGPOINT = {
414
- id: 'debug.editor.context.logpoint.enable'
415
- };
416
- DebugEditorContextCommands.DISABLE_LOGPOINT = {
417
- id: 'debug.editor.context.logpoint.disable'
418
- };
419
- DebugEditorContextCommands.JUMP_TO_CURSOR = {
420
- id: 'debug.editor.context.jumpToCursor'
421
- };
422
- DebugEditorContextCommands.RUN_TO_LINE = {
423
- id: 'debug.editor.context.runToLine'
424
- };
425
- })(DebugEditorContextCommands || (exports.DebugEditorContextCommands = DebugEditorContextCommands = {}));
426
- var DebugBreakpointWidgetCommands;
427
- (function (DebugBreakpointWidgetCommands) {
428
- DebugBreakpointWidgetCommands.ACCEPT = {
429
- id: 'debug.breakpointWidget.accept'
430
- };
431
- DebugBreakpointWidgetCommands.CLOSE = {
432
- id: 'debug.breakpointWidget.close'
433
- };
434
- })(DebugBreakpointWidgetCommands || (exports.DebugBreakpointWidgetCommands = DebugBreakpointWidgetCommands = {}));
62
+ const debug_commands_1 = require("./debug-commands");
435
63
  let DebugFrontendApplicationContribution = class DebugFrontendApplicationContribution extends browser_1.AbstractViewContribution {
436
64
  constructor() {
437
65
  super({
@@ -514,86 +142,88 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
514
142
  const registerMenuActions = (menuPath, ...commands) => {
515
143
  for (const [index, command] of commands.entries()) {
516
144
  const label = command.label;
517
- const debug = `${DebugCommands.DEBUG_CATEGORY}:`;
145
+ const debug = `${debug_commands_1.DebugCommands.DEBUG_CATEGORY}:`;
518
146
  menus.registerMenuAction(menuPath, {
519
147
  commandId: command.id,
520
148
  label: label && label.startsWith(debug) && label.slice(debug.length).trimStart() || label,
521
149
  icon: command.iconClass,
150
+ when: command.when,
522
151
  order: command.order || String.fromCharCode('a'.charCodeAt(0) + index)
523
152
  });
524
153
  }
525
154
  };
526
- menus.registerSubmenu(DebugMenus.DEBUG, nls_1.nls.localizeByDefault('Run'));
527
- registerMenuActions(DebugMenus.DEBUG_CONTROLS, DebugCommands.START, DebugCommands.START_NO_DEBUG, DebugCommands.STOP, DebugCommands.RESTART);
528
- registerMenuActions(DebugMenus.DEBUG_CONFIGURATION, DebugCommands.OPEN_CONFIGURATIONS, DebugCommands.ADD_CONFIGURATION);
529
- registerMenuActions(DebugMenus.DEBUG_THREADS, DebugCommands.CONTINUE, DebugCommands.STEP_OVER, DebugCommands.STEP_INTO, DebugCommands.STEP_OUT, DebugCommands.PAUSE);
530
- registerMenuActions(DebugMenus.DEBUG_SESSIONS, DebugCommands.CONTINUE_ALL, DebugCommands.PAUSE_ALL);
531
- registerMenuActions(DebugMenus.DEBUG_BREAKPOINT, DebugCommands.TOGGLE_BREAKPOINT);
532
- menus.registerSubmenu(DebugMenus.DEBUG_NEW_BREAKPOINT, nls_1.nls.localizeByDefault('New Breakpoint'));
533
- registerMenuActions(DebugMenus.DEBUG_NEW_BREAKPOINT, DebugCommands.ADD_CONDITIONAL_BREAKPOINT, DebugCommands.INLINE_BREAKPOINT, DebugCommands.ADD_FUNCTION_BREAKPOINT, DebugCommands.ADD_LOGPOINT, DebugCommands.ADD_DATA_BREAKPOINT);
534
- registerMenuActions(DebugMenus.DEBUG_BREAKPOINTS, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS, DebugCommands.REMOVE_ALL_BREAKPOINTS);
535
- registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.CONTROL_MENU, { ...DebugCommands.PAUSE, ...DebugThreadContextCommands.PAUSE }, { ...DebugCommands.CONTINUE, ...DebugThreadContextCommands.CONTINUE }, { ...DebugCommands.STEP_OVER, ...DebugThreadContextCommands.STEP_OVER }, { ...DebugCommands.STEP_INTO, ...DebugThreadContextCommands.STEP_INTO }, { ...DebugCommands.STEP_OUT, ...DebugThreadContextCommands.STEP_OUT }, { ...DebugCommands.PAUSE_ALL, ...DebugSessionContextCommands.PAUSE_ALL }, { ...DebugCommands.CONTINUE_ALL, ...DebugSessionContextCommands.CONTINUE_ALL });
536
- registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.TERMINATE_MENU, { ...DebugCommands.RESTART, ...DebugSessionContextCommands.RESTART }, { ...DebugCommands.STOP, ...DebugSessionContextCommands.STOP }, { ...DebugThreadContextCommands.TERMINATE, label: nls_1.nls.localizeByDefault('Terminate Thread') });
537
- registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.OPEN_MENU, { ...DebugSessionContextCommands.REVEAL, label: nls_1.nls.localize('theia/debug/reveal', 'Reveal') });
538
- registerMenuActions(debug_stack_frames_widget_1.DebugStackFramesWidget.CONTEXT_MENU, DebugCommands.RESTART_FRAME, DebugCommands.COPY_CALL_STACK);
539
- registerMenuActions(console_contribution_1.ConsoleContextMenu.CLIPBOARD, { ...DebugCommands.COPY_VARIABLE_VALUE, order: 'a1a' }, { ...DebugCommands.COPY_VARIABLE_AS_EXPRESSION, order: 'a1b' });
540
- registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.EDIT_MENU, DebugCommands.SET_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
541
- registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.WATCH_MENU, DebugCommands.WATCH_VARIABLE);
542
- registerMenuActions(debug_hover_widget_1.DebugHoverWidget.EDIT_MENU, DebugCommands.COPY_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
543
- registerMenuActions(debug_hover_widget_1.DebugHoverWidget.WATCH_MENU, DebugCommands.WATCH_VARIABLE);
544
- registerMenuActions(debug_watch_widget_1.DebugWatchWidget.EDIT_MENU, DebugCommands.EDIT_WATCH_EXPRESSION, DebugCommands.COPY_WATCH_EXPRESSION_VALUE);
545
- registerMenuActions(debug_watch_widget_1.DebugWatchWidget.REMOVE_MENU, DebugCommands.REMOVE_WATCH_EXPRESSION, DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS);
546
- registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.EDIT_MENU, DebugCommands.EDIT_BREAKPOINT, { ...DebugCommands.ADD_DATA_BREAKPOINT, label: nls_1.nls.localizeByDefault('Edit Address...'), originalLabel: 'Edit Address...' }, DebugCommands.EDIT_LOGPOINT, DebugCommands.EDIT_BREAKPOINT_CONDITION);
547
- registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.REMOVE_MENU, DebugCommands.REMOVE_BREAKPOINT, DebugCommands.REMOVE_LOGPOINT, DebugCommands.REMOVE_SELECTED_BREAKPOINTS, DebugCommands.REMOVE_ALL_BREAKPOINTS);
548
- registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.ENABLE_MENU, DebugCommands.ENABLE_SELECTED_BREAKPOINTS, DebugCommands.DISABLE_SELECTED_BREAKPOINTS, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS);
155
+ menus.registerSubmenu(debug_commands_1.DebugMenus.DEBUG, nls_1.nls.localizeByDefault('Run'));
156
+ registerMenuActions(debug_commands_1.DebugMenus.DEBUG_CONTROLS, debug_commands_1.DebugCommands.START, debug_commands_1.DebugCommands.START_NO_DEBUG, debug_commands_1.DebugCommands.STOP, debug_commands_1.DebugCommands.RESTART);
157
+ registerMenuActions(debug_commands_1.DebugMenus.DEBUG_CONFIGURATION, debug_commands_1.DebugCommands.OPEN_CONFIGURATIONS, debug_commands_1.DebugCommands.ADD_CONFIGURATION);
158
+ registerMenuActions(debug_commands_1.DebugMenus.DEBUG_THREADS, debug_commands_1.DebugCommands.CONTINUE, debug_commands_1.DebugCommands.STEP_OVER, debug_commands_1.DebugCommands.STEP_INTO, debug_commands_1.DebugCommands.STEP_OUT, debug_commands_1.DebugCommands.PAUSE);
159
+ registerMenuActions(debug_commands_1.DebugMenus.DEBUG_SESSIONS, debug_commands_1.DebugCommands.CONTINUE_ALL, debug_commands_1.DebugCommands.PAUSE_ALL);
160
+ registerMenuActions(debug_commands_1.DebugMenus.DEBUG_BREAKPOINT, debug_commands_1.DebugCommands.TOGGLE_BREAKPOINT);
161
+ menus.registerSubmenu(debug_commands_1.DebugMenus.DEBUG_NEW_BREAKPOINT, nls_1.nls.localizeByDefault('New Breakpoint'));
162
+ registerMenuActions(debug_commands_1.DebugMenus.DEBUG_NEW_BREAKPOINT, debug_commands_1.DebugCommands.ADD_CONDITIONAL_BREAKPOINT, debug_commands_1.DebugCommands.INLINE_BREAKPOINT, debug_commands_1.DebugCommands.ADD_FUNCTION_BREAKPOINT, debug_commands_1.DebugCommands.ADD_LOGPOINT, debug_commands_1.DebugCommands.ADD_DATA_BREAKPOINT);
163
+ registerMenuActions(debug_commands_1.DebugMenus.DEBUG_BREAKPOINTS, debug_commands_1.DebugCommands.ENABLE_ALL_BREAKPOINTS, debug_commands_1.DebugCommands.DISABLE_ALL_BREAKPOINTS, debug_commands_1.DebugCommands.REMOVE_ALL_BREAKPOINTS);
164
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.CONTROL_MENU, { ...debug_commands_1.DebugCommands.PAUSE, ...debug_commands_1.DebugThreadContextCommands.PAUSE }, { ...debug_commands_1.DebugCommands.CONTINUE, ...debug_commands_1.DebugThreadContextCommands.CONTINUE }, { ...debug_commands_1.DebugCommands.STEP_OVER, ...debug_commands_1.DebugThreadContextCommands.STEP_OVER }, { ...debug_commands_1.DebugCommands.STEP_INTO, ...debug_commands_1.DebugThreadContextCommands.STEP_INTO }, { ...debug_commands_1.DebugCommands.STEP_OUT, ...debug_commands_1.DebugThreadContextCommands.STEP_OUT }, { ...debug_commands_1.DebugCommands.PAUSE_ALL, ...debug_commands_1.DebugSessionContextCommands.PAUSE_ALL }, { ...debug_commands_1.DebugCommands.CONTINUE_ALL, ...debug_commands_1.DebugSessionContextCommands.CONTINUE_ALL });
165
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.TERMINATE_MENU, { ...debug_commands_1.DebugCommands.RESTART, ...debug_commands_1.DebugSessionContextCommands.RESTART }, { ...debug_commands_1.DebugCommands.STOP, ...debug_commands_1.DebugSessionContextCommands.STOP }, { ...debug_commands_1.DebugThreadContextCommands.TERMINATE, label: nls_1.nls.localizeByDefault('Terminate Thread') });
166
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.OPEN_MENU, { ...debug_commands_1.DebugSessionContextCommands.REVEAL, label: nls_1.nls.localize('theia/debug/reveal', 'Reveal') });
167
+ registerMenuActions(debug_stack_frames_widget_1.DebugStackFramesWidget.CONTEXT_MENU, debug_commands_1.DebugCommands.RESTART_FRAME, debug_commands_1.DebugCommands.COPY_CALL_STACK);
168
+ registerMenuActions(console_contribution_1.ConsoleContextMenu.CLIPBOARD, { ...debug_commands_1.DebugCommands.COPY_VARIABLE_VALUE, order: 'a1a' }, { ...debug_commands_1.DebugCommands.COPY_VARIABLE_AS_EXPRESSION, order: 'a1b' });
169
+ registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.EDIT_MENU, debug_commands_1.DebugCommands.SET_VARIABLE_VALUE, debug_commands_1.DebugCommands.COPY_VARIABLE_VALUE, debug_commands_1.DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
170
+ registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.WATCH_MENU, debug_commands_1.DebugCommands.WATCH_VARIABLE);
171
+ registerMenuActions(debug_hover_widget_1.DebugHoverWidget.EDIT_MENU, debug_commands_1.DebugCommands.COPY_VARIABLE_VALUE, debug_commands_1.DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
172
+ registerMenuActions(debug_hover_widget_1.DebugHoverWidget.WATCH_MENU, debug_commands_1.DebugCommands.WATCH_VARIABLE);
173
+ registerMenuActions(debug_watch_widget_1.DebugWatchWidget.EDIT_MENU, debug_commands_1.DebugCommands.EDIT_WATCH_EXPRESSION, debug_commands_1.DebugCommands.COPY_WATCH_EXPRESSION_VALUE);
174
+ registerMenuActions(debug_watch_widget_1.DebugWatchWidget.REMOVE_MENU, debug_commands_1.DebugCommands.REMOVE_WATCH_EXPRESSION, debug_commands_1.DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS);
175
+ registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.EDIT_MENU, debug_commands_1.DebugCommands.EDIT_BREAKPOINT, { ...debug_commands_1.DebugCommands.ADD_DATA_BREAKPOINT, label: nls_1.nls.localizeByDefault('Edit Address...'), originalLabel: 'Edit Address...' }, debug_commands_1.DebugCommands.EDIT_LOGPOINT, debug_commands_1.DebugCommands.EDIT_BREAKPOINT_CONDITION);
176
+ registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.REMOVE_MENU, debug_commands_1.DebugCommands.REMOVE_BREAKPOINT, debug_commands_1.DebugCommands.REMOVE_LOGPOINT, debug_commands_1.DebugCommands.REMOVE_SELECTED_BREAKPOINTS, debug_commands_1.DebugCommands.REMOVE_ALL_BREAKPOINTS);
177
+ registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.ENABLE_MENU, debug_commands_1.DebugCommands.ENABLE_SELECTED_BREAKPOINTS, debug_commands_1.DebugCommands.DISABLE_SELECTED_BREAKPOINTS, debug_commands_1.DebugCommands.ENABLE_ALL_BREAKPOINTS, debug_commands_1.DebugCommands.DISABLE_ALL_BREAKPOINTS);
549
178
  const DEBUG_EDITOR_CONTEXT_MENU_GROUP = [...browser_2.EDITOR_CONTEXT_MENU, '2_debug'];
550
- registerMenuActions(DEBUG_EDITOR_CONTEXT_MENU_GROUP, DebugCommands.EVALUATE_IN_DEBUG_CONSOLE, DebugCommands.ADD_TO_WATCH, DebugCommands.JUMP_TO_CURSOR, DebugCommands.RUN_TO_CURSOR, DebugCommands.RUN_TO_LINE);
551
- registerMenuActions([...debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, '1_breakpoint'], { ...DebugEditorContextCommands.ADD_BREAKPOINT, label: nls_1.nls.localizeByDefault('Add Breakpoint') }, { ...DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, label: DebugCommands.ADD_CONDITIONAL_BREAKPOINT.label }, { ...DebugEditorContextCommands.ADD_LOGPOINT, label: DebugCommands.ADD_LOGPOINT.label }, { ...DebugEditorContextCommands.REMOVE_BREAKPOINT, label: DebugCommands.REMOVE_BREAKPOINT.label }, { ...DebugEditorContextCommands.EDIT_BREAKPOINT, label: DebugCommands.EDIT_BREAKPOINT.label }, { ...DebugEditorContextCommands.ENABLE_BREAKPOINT, label: nlsEnableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.DISABLE_BREAKPOINT, label: nlsDisableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.REMOVE_LOGPOINT, label: DebugCommands.REMOVE_LOGPOINT.label }, { ...DebugEditorContextCommands.EDIT_LOGPOINT, label: DebugCommands.EDIT_LOGPOINT.label }, { ...DebugEditorContextCommands.ENABLE_LOGPOINT, label: nlsEnableBreakpoint('Logpoint') }, { ...DebugEditorContextCommands.DISABLE_LOGPOINT, label: nlsDisableBreakpoint('Logpoint') });
552
- registerMenuActions([...debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, '2_control'], { ...DebugEditorContextCommands.JUMP_TO_CURSOR, label: nls_1.nls.localizeByDefault('Jump to Cursor') }, { ...DebugEditorContextCommands.RUN_TO_LINE, label: DebugCommands.RUN_TO_LINE.label });
179
+ registerMenuActions(DEBUG_EDITOR_CONTEXT_MENU_GROUP, debug_commands_1.DebugCommands.EVALUATE_IN_DEBUG_CONSOLE, debug_commands_1.DebugCommands.ADD_TO_WATCH, debug_commands_1.DebugCommands.JUMP_TO_CURSOR, debug_commands_1.DebugCommands.RUN_TO_CURSOR, debug_commands_1.DebugCommands.RUN_TO_LINE);
180
+ registerMenuActions([...debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, '1_breakpoint'], { ...debug_commands_1.DebugEditorContextCommands.ADD_BREAKPOINT, label: nls_1.nls.localizeByDefault('Add Breakpoint') }, { ...debug_commands_1.DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, label: debug_commands_1.DebugCommands.ADD_CONDITIONAL_BREAKPOINT.label }, { ...debug_commands_1.DebugEditorContextCommands.ADD_LOGPOINT, label: debug_commands_1.DebugCommands.ADD_LOGPOINT.label }, { ...debug_commands_1.DebugEditorContextCommands.REMOVE_BREAKPOINT, label: debug_commands_1.DebugCommands.REMOVE_BREAKPOINT.label }, { ...debug_commands_1.DebugEditorContextCommands.EDIT_BREAKPOINT, label: debug_commands_1.DebugCommands.EDIT_BREAKPOINT.label }, { ...debug_commands_1.DebugEditorContextCommands.ENABLE_BREAKPOINT, label: (0, debug_commands_1.nlsEnableBreakpoint)('Breakpoint') }, { ...debug_commands_1.DebugEditorContextCommands.DISABLE_BREAKPOINT, label: (0, debug_commands_1.nlsDisableBreakpoint)('Breakpoint') }, { ...debug_commands_1.DebugEditorContextCommands.REMOVE_LOGPOINT, label: debug_commands_1.DebugCommands.REMOVE_LOGPOINT.label }, { ...debug_commands_1.DebugEditorContextCommands.EDIT_LOGPOINT, label: debug_commands_1.DebugCommands.EDIT_LOGPOINT.label }, { ...debug_commands_1.DebugEditorContextCommands.ENABLE_LOGPOINT, label: (0, debug_commands_1.nlsEnableBreakpoint)('Logpoint') }, { ...debug_commands_1.DebugEditorContextCommands.DISABLE_LOGPOINT, label: (0, debug_commands_1.nlsDisableBreakpoint)('Logpoint') });
181
+ registerMenuActions([...debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, '2_control'], { ...debug_commands_1.DebugEditorContextCommands.JUMP_TO_CURSOR, label: nls_1.nls.localizeByDefault('Jump to Cursor') }, { ...debug_commands_1.DebugEditorContextCommands.RUN_TO_LINE, label: debug_commands_1.DebugCommands.RUN_TO_LINE.label });
553
182
  menus.linkCompoundMenuNode({ newParentPath: browser_2.EDITOR_LINENUMBER_CONTEXT_MENU, submenuPath: debug_editor_model_1.DebugEditorModel.CONTEXT_MENU });
554
183
  menus.registerSubmenu(debug_toolbar_widget_1.DebugToolBar.MENU, nls_1.nls.localize('theia/debug/debugToolbarMenu', 'Debug Toolbar Menu'));
184
+ registerMenuActions(debug_toolbar_widget_1.DebugToolBar.CONTROLS, { ...debug_commands_1.DebugCommands.CONTINUE, when: 'debugState == stopped' }, { ...debug_commands_1.DebugCommands.PAUSE, when: 'debugState != stopped' }, debug_commands_1.DebugCommands.STEP_OVER, debug_commands_1.DebugCommands.STEP_INTO, debug_commands_1.DebugCommands.STEP_OUT, debug_commands_1.DebugCommands.RESTART, debug_commands_1.DebugCommands.STOP);
555
185
  }
556
186
  registerCommands(registry) {
557
187
  super.registerCommands(registry);
558
- registry.registerCommand(DebugCommands.START, {
188
+ registry.registerCommand(debug_commands_1.DebugCommands.START, {
559
189
  execute: (config) => {
560
190
  const validConfig = debug_session_options_1.DebugSessionOptions.is(config) ? config : undefined;
561
191
  return this.start(false, validConfig);
562
192
  }
563
193
  });
564
- registry.registerCommand(DebugCommands.START_NO_DEBUG, {
194
+ registry.registerCommand(debug_commands_1.DebugCommands.START_NO_DEBUG, {
565
195
  execute: (config) => {
566
196
  const validConfig = debug_session_options_1.DebugSessionOptions.is(config) ? config : undefined;
567
197
  return this.start(true, validConfig);
568
198
  }
569
199
  });
570
- registry.registerCommand(DebugCommands.STOP, {
200
+ registry.registerCommand(debug_commands_1.DebugCommands.STOP, {
571
201
  execute: () => this.manager.terminateSession(),
572
202
  isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
573
203
  });
574
- registry.registerCommand(DebugCommands.RESTART, {
204
+ registry.registerCommand(debug_commands_1.DebugCommands.RESTART, {
575
205
  execute: () => this.manager.restartSession(),
576
206
  isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
577
207
  });
578
- registry.registerCommand(DebugCommands.OPEN_CONFIGURATIONS, {
208
+ registry.registerCommand(debug_commands_1.DebugCommands.OPEN_CONFIGURATIONS, {
579
209
  execute: () => this.configurations.openConfiguration()
580
210
  });
581
- registry.registerCommand(DebugCommands.ADD_CONFIGURATION, {
211
+ registry.registerCommand(debug_commands_1.DebugCommands.ADD_CONFIGURATION, {
582
212
  execute: () => this.configurations.addConfiguration()
583
213
  });
584
- registry.registerCommand(DebugCommands.STEP_OVER, {
214
+ registry.registerCommand(debug_commands_1.DebugCommands.STEP_OVER, {
585
215
  execute: () => this.manager.currentThread && this.manager.currentThread.stepOver(),
586
216
  isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
587
217
  });
588
- registry.registerCommand(DebugCommands.STEP_INTO, {
218
+ registry.registerCommand(debug_commands_1.DebugCommands.STEP_INTO, {
589
219
  execute: () => this.manager.currentThread && this.manager.currentThread.stepIn(),
590
220
  isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
591
221
  });
592
- registry.registerCommand(DebugCommands.STEP_OUT, {
222
+ registry.registerCommand(debug_commands_1.DebugCommands.STEP_OUT, {
593
223
  execute: () => this.manager.currentThread && this.manager.currentThread.stepOut(),
594
224
  isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
595
225
  });
596
- registry.registerCommand(DebugCommands.CONTINUE, {
226
+ registry.registerCommand(debug_commands_1.DebugCommands.CONTINUE, {
597
227
  execute: () => {
598
228
  if (this.manager.state === debug_session_1.DebugState.Stopped && this.manager.currentThread) {
599
229
  this.manager.currentThread.continue();
@@ -602,90 +232,90 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
602
232
  // When there is a debug session, F5 should always be captured by this command
603
233
  isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
604
234
  });
605
- registry.registerCommand(DebugCommands.PAUSE, {
235
+ registry.registerCommand(debug_commands_1.DebugCommands.PAUSE, {
606
236
  execute: () => this.manager.currentThread && this.manager.currentThread.pause(),
607
237
  isEnabled: () => this.manager.state === debug_session_1.DebugState.Running
608
238
  });
609
- registry.registerCommand(DebugCommands.PAUSE_ALL, {
239
+ registry.registerCommand(debug_commands_1.DebugCommands.PAUSE_ALL, {
610
240
  execute: () => this.manager.currentSession && this.manager.currentSession.pauseAll(),
611
241
  isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.runningThreads.next().value
612
242
  });
613
- registry.registerCommand(DebugCommands.CONTINUE_ALL, {
243
+ registry.registerCommand(debug_commands_1.DebugCommands.CONTINUE_ALL, {
614
244
  execute: () => this.manager.currentSession && this.manager.currentSession.continueAll(),
615
245
  isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.stoppedThreads.next().value
616
246
  });
617
- registry.registerCommand(DebugThreadContextCommands.STEP_OVER, {
247
+ registry.registerCommand(debug_commands_1.DebugThreadContextCommands.STEP_OVER, {
618
248
  execute: () => this.selectedThread && this.selectedThread.stepOver(),
619
249
  isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
620
250
  isVisible: () => !!this.selectedThread
621
251
  });
622
- registry.registerCommand(DebugThreadContextCommands.STEP_INTO, {
252
+ registry.registerCommand(debug_commands_1.DebugThreadContextCommands.STEP_INTO, {
623
253
  execute: () => this.selectedThread && this.selectedThread.stepIn(),
624
254
  isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
625
255
  isVisible: () => !!this.selectedThread
626
256
  });
627
- registry.registerCommand(DebugThreadContextCommands.STEP_OUT, {
257
+ registry.registerCommand(debug_commands_1.DebugThreadContextCommands.STEP_OUT, {
628
258
  execute: () => this.selectedThread && this.selectedThread.stepOut(),
629
259
  isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
630
260
  isVisible: () => !!this.selectedThread
631
261
  });
632
- registry.registerCommand(DebugThreadContextCommands.CONTINUE, {
262
+ registry.registerCommand(debug_commands_1.DebugThreadContextCommands.CONTINUE, {
633
263
  execute: () => this.selectedThread && this.selectedThread.continue(),
634
264
  isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
635
265
  isVisible: () => !!this.selectedThread && this.selectedThread.stopped,
636
266
  });
637
- registry.registerCommand(DebugThreadContextCommands.PAUSE, {
267
+ registry.registerCommand(debug_commands_1.DebugThreadContextCommands.PAUSE, {
638
268
  execute: () => this.selectedThread && this.selectedThread.pause(),
639
269
  isEnabled: () => !!this.selectedThread && !this.selectedThread.stopped,
640
270
  isVisible: () => !!this.selectedThread && !this.selectedThread.stopped,
641
271
  });
642
- registry.registerCommand(DebugThreadContextCommands.TERMINATE, {
272
+ registry.registerCommand(debug_commands_1.DebugThreadContextCommands.TERMINATE, {
643
273
  execute: () => this.selectedThread && this.selectedThread.terminate(),
644
274
  isEnabled: () => !!this.selectedThread && this.selectedThread.supportsTerminate,
645
275
  isVisible: () => !!this.selectedThread && this.selectedThread.supportsTerminate
646
276
  });
647
- registry.registerCommand(DebugSessionContextCommands.STOP, {
277
+ registry.registerCommand(debug_commands_1.DebugSessionContextCommands.STOP, {
648
278
  execute: () => this.selectedSession && this.manager.terminateSession(this.selectedSession),
649
279
  isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
650
280
  isVisible: () => !this.selectedThread
651
281
  });
652
- registry.registerCommand(DebugSessionContextCommands.RESTART, {
282
+ registry.registerCommand(debug_commands_1.DebugSessionContextCommands.RESTART, {
653
283
  execute: () => this.selectedSession && this.manager.restartSession(this.selectedSession),
654
284
  isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
655
285
  isVisible: () => !this.selectedThread
656
286
  });
657
- registry.registerCommand(DebugSessionContextCommands.CONTINUE_ALL, {
287
+ registry.registerCommand(debug_commands_1.DebugSessionContextCommands.CONTINUE_ALL, {
658
288
  execute: () => this.selectedSession && this.selectedSession.continueAll(),
659
289
  isEnabled: () => !!this.selectedSession && !!this.selectedSession.stoppedThreads.next().value,
660
290
  isVisible: () => !this.selectedThread
661
291
  });
662
- registry.registerCommand(DebugSessionContextCommands.PAUSE_ALL, {
292
+ registry.registerCommand(debug_commands_1.DebugSessionContextCommands.PAUSE_ALL, {
663
293
  execute: () => this.selectedSession && this.selectedSession.pauseAll(),
664
294
  isEnabled: () => !!this.selectedSession && !!this.selectedSession.runningThreads.next().value,
665
295
  isVisible: () => !this.selectedThread
666
296
  });
667
- registry.registerCommand(DebugSessionContextCommands.REVEAL, {
297
+ registry.registerCommand(debug_commands_1.DebugSessionContextCommands.REVEAL, {
668
298
  execute: () => this.selectedSession && this.revealSession(this.selectedSession),
669
299
  isEnabled: () => Boolean(this.selectedSession),
670
300
  isVisible: () => !this.selectedThread && Boolean(this.selectedSession)
671
301
  });
672
- registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINT, {
302
+ registry.registerCommand(debug_commands_1.DebugCommands.TOGGLE_BREAKPOINT, {
673
303
  execute: () => this.editors.toggleBreakpoint(),
674
304
  isEnabled: () => !!this.editors.model
675
305
  });
676
- registry.registerCommand(DebugCommands.INLINE_BREAKPOINT, {
306
+ registry.registerCommand(debug_commands_1.DebugCommands.INLINE_BREAKPOINT, {
677
307
  execute: () => this.editors.addInlineBreakpoint(),
678
308
  isEnabled: () => !!this.editors.model && !this.editors.getInlineBreakpoint()
679
309
  });
680
- registry.registerCommand(DebugCommands.ADD_CONDITIONAL_BREAKPOINT, {
310
+ registry.registerCommand(debug_commands_1.DebugCommands.ADD_CONDITIONAL_BREAKPOINT, {
681
311
  execute: () => this.editors.addBreakpoint('condition'),
682
312
  isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
683
313
  });
684
- registry.registerCommand(DebugCommands.ADD_LOGPOINT, {
314
+ registry.registerCommand(debug_commands_1.DebugCommands.ADD_LOGPOINT, {
685
315
  execute: () => this.editors.addBreakpoint('logMessage'),
686
316
  isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
687
317
  });
688
- registry.registerCommand(DebugCommands.ADD_FUNCTION_BREAKPOINT, {
318
+ registry.registerCommand(debug_commands_1.DebugCommands.ADD_FUNCTION_BREAKPOINT, {
689
319
  execute: async () => {
690
320
  const { labelProvider, breakpointManager, editorManager } = this;
691
321
  const options = { labelProvider, breakpoints: breakpointManager, editorManager };
@@ -694,39 +324,42 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
694
324
  isEnabled: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget,
695
325
  isVisible: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
696
326
  });
697
- registry.registerCommand(DebugCommands.ADD_DATA_BREAKPOINT, this.AddOrEditDataBreakpointAddress);
698
- registry.registerCommand(DebugCommands.ENABLE_ALL_BREAKPOINTS, {
327
+ registry.registerCommand(debug_commands_1.DebugCommands.ADD_DATA_BREAKPOINT, this.AddOrEditDataBreakpointAddress);
328
+ registry.registerCommand(debug_commands_1.DebugCommands.ENABLE_ALL_BREAKPOINTS, {
699
329
  execute: () => this.breakpointManager.enableAllBreakpoints(true),
700
330
  isEnabled: () => this.breakpointManager.hasBreakpoints()
701
331
  });
702
- registry.registerCommand(DebugCommands.ENABLE_SELECTED_BREAKPOINTS, {
332
+ registry.registerCommand(debug_commands_1.DebugCommands.ENABLE_SELECTED_BREAKPOINTS, {
703
333
  execute: () => this.selectedBreakpoints.forEach(breakpoint => breakpoint.setEnabled(true)),
704
334
  isVisible: () => this.selectedBreakpoints.some(breakpoint => !breakpoint.enabled),
705
335
  isEnabled: () => this.selectedBreakpoints.some(breakpoint => !breakpoint.enabled)
706
336
  });
707
- registry.registerCommand(DebugCommands.DISABLE_ALL_BREAKPOINTS, {
337
+ registry.registerCommand(debug_commands_1.DebugCommands.DISABLE_ALL_BREAKPOINTS, {
708
338
  execute: () => this.breakpointManager.enableAllBreakpoints(false),
709
339
  isEnabled: () => this.breakpointManager.hasBreakpoints()
710
340
  });
711
- registry.registerCommand(DebugCommands.DISABLE_SELECTED_BREAKPOINTS, {
341
+ registry.registerCommand(debug_commands_1.DebugCommands.DISABLE_SELECTED_BREAKPOINTS, {
712
342
  execute: () => this.selectedBreakpoints.forEach(breakpoint => breakpoint.setEnabled(false)),
713
343
  isVisible: () => this.selectedBreakpoints.some(breakpoint => breakpoint.enabled),
714
344
  isEnabled: () => this.selectedBreakpoints.some(breakpoint => breakpoint.enabled)
715
345
  });
716
- registry.registerCommand(DebugCommands.EDIT_BREAKPOINT, {
346
+ registry.registerCommand(debug_commands_1.DebugCommands.EDIT_BREAKPOINT, {
717
347
  execute: async () => {
718
- const { selectedBreakpoint, selectedFunctionBreakpoint } = this;
348
+ const { selectedBreakpoint, selectedFunctionBreakpoint, selectedLogpoint } = this;
719
349
  if (selectedBreakpoint) {
720
350
  await this.editors.editBreakpoint(selectedBreakpoint);
721
351
  }
722
352
  else if (selectedFunctionBreakpoint) {
723
353
  await selectedFunctionBreakpoint.open();
724
354
  }
355
+ else if (selectedLogpoint) {
356
+ await this.editors.editBreakpoint(selectedLogpoint);
357
+ }
725
358
  },
726
- isEnabled: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint),
727
- isVisible: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint)
359
+ isEnabled: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint || !!this.selectedLogpoint),
360
+ isVisible: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint || !!this.selectedLogpoint)
728
361
  });
729
- registry.registerCommand(DebugCommands.EDIT_LOGPOINT, {
362
+ registry.registerCommand(debug_commands_1.DebugCommands.EDIT_LOGPOINT, {
730
363
  execute: async () => {
731
364
  const { selectedLogpoint } = this;
732
365
  if (selectedLogpoint) {
@@ -736,17 +369,17 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
736
369
  isEnabled: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint,
737
370
  isVisible: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint
738
371
  });
739
- registry.registerCommand(DebugCommands.EDIT_BREAKPOINT_CONDITION, {
372
+ registry.registerCommand(debug_commands_1.DebugCommands.EDIT_BREAKPOINT_CONDITION, {
740
373
  execute: async () => {
741
374
  const { selectedExceptionBreakpoint } = this;
742
375
  if (selectedExceptionBreakpoint) {
743
376
  await selectedExceptionBreakpoint.editCondition();
744
377
  }
745
378
  },
746
- isEnabled: () => { var _a; return this.selectedBreakpoints.length === 1 && !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); },
747
- isVisible: () => { var _a; return this.selectedBreakpoints.length === 1 && !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); }
379
+ isEnabled: () => { var _a; return !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); },
380
+ isVisible: () => { var _a; return !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); }
748
381
  });
749
- registry.registerCommand(DebugCommands.REMOVE_BREAKPOINT, {
382
+ registry.registerCommand(debug_commands_1.DebugCommands.REMOVE_BREAKPOINT, {
750
383
  execute: () => {
751
384
  const selectedBreakpoint = this.selectedSettableBreakpoint;
752
385
  if (selectedBreakpoint) {
@@ -756,7 +389,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
756
389
  isEnabled: () => this.selectedBreakpoints.length === 1 && Boolean(this.selectedSettableBreakpoint),
757
390
  isVisible: () => this.selectedBreakpoints.length === 1 && Boolean(this.selectedSettableBreakpoint),
758
391
  });
759
- registry.registerCommand(DebugCommands.REMOVE_LOGPOINT, {
392
+ registry.registerCommand(debug_commands_1.DebugCommands.REMOVE_LOGPOINT, {
760
393
  execute: () => {
761
394
  const { selectedLogpoint } = this;
762
395
  if (selectedLogpoint) {
@@ -766,25 +399,25 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
766
399
  isEnabled: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint,
767
400
  isVisible: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint
768
401
  });
769
- registry.registerCommand(DebugCommands.REMOVE_ALL_BREAKPOINTS, {
402
+ registry.registerCommand(debug_commands_1.DebugCommands.REMOVE_ALL_BREAKPOINTS, {
770
403
  execute: () => this.breakpointManager.removeBreakpoints(),
771
404
  isEnabled: () => this.breakpointManager.hasBreakpoints(),
772
405
  isVisible: widget => !(widget instanceof browser_1.Widget) || (widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget)
773
406
  });
774
- registry.registerCommand(DebugCommands.REMOVE_SELECTED_BREAKPOINTS, {
407
+ registry.registerCommand(debug_commands_1.DebugCommands.REMOVE_SELECTED_BREAKPOINTS, {
775
408
  execute: () => this.selectedBreakpoints.forEach(breakpoint => breakpoint.remove()),
776
409
  isEnabled: () => this.selectedBreakpoints.length > 1,
777
410
  isVisible: widget => (!(widget instanceof browser_1.Widget) || (widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget)) && this.selectedBreakpoints.length > 1
778
411
  });
779
- registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINTS_ENABLED, {
412
+ registry.registerCommand(debug_commands_1.DebugCommands.TOGGLE_BREAKPOINTS_ENABLED, {
780
413
  execute: () => this.breakpointManager.breakpointsEnabled = !this.breakpointManager.breakpointsEnabled,
781
414
  isVisible: arg => arg instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
782
415
  });
783
- registry.registerCommand(DebugCommands.SHOW_HOVER, {
416
+ registry.registerCommand(debug_commands_1.DebugCommands.SHOW_HOVER, {
784
417
  execute: () => this.editors.showHover(),
785
418
  isEnabled: () => this.editors.canShowHover()
786
419
  });
787
- registry.registerCommand(DebugCommands.EVALUATE_IN_DEBUG_CONSOLE, {
420
+ registry.registerCommand(debug_commands_1.DebugCommands.EVALUATE_IN_DEBUG_CONSOLE, {
788
421
  execute: async () => {
789
422
  const { model } = this.editors;
790
423
  if (model) {
@@ -798,7 +431,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
798
431
  isEnabled: () => !!this.editors.model && !!this.manager.currentFrame,
799
432
  isVisible: () => !!this.editors.model && !!this.manager.currentFrame
800
433
  });
801
- registry.registerCommand(DebugCommands.ADD_TO_WATCH, {
434
+ registry.registerCommand(debug_commands_1.DebugCommands.ADD_TO_WATCH, {
802
435
  execute: async () => {
803
436
  var _a, _b;
804
437
  const { model } = this.editors;
@@ -821,7 +454,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
821
454
  isEnabled: () => !!this.editors.model && this.manager.inDebugMode,
822
455
  isVisible: () => !!this.editors.model && this.manager.inDebugMode
823
456
  });
824
- registry.registerCommand(DebugCommands.JUMP_TO_CURSOR, {
457
+ registry.registerCommand(debug_commands_1.DebugCommands.JUMP_TO_CURSOR, {
825
458
  execute: () => {
826
459
  const model = this.editors.model;
827
460
  if (model && this.manager.currentThread) {
@@ -831,7 +464,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
831
464
  isEnabled: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto,
832
465
  isVisible: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto
833
466
  });
834
- registry.registerCommand(DebugCommands.RUN_TO_CURSOR, {
467
+ registry.registerCommand(debug_commands_1.DebugCommands.RUN_TO_CURSOR, {
835
468
  execute: async () => {
836
469
  const { model } = this.editors;
837
470
  if (model) {
@@ -842,7 +475,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
842
475
  isEnabled: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); },
843
476
  isVisible: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); }
844
477
  });
845
- registry.registerCommand(DebugCommands.RUN_TO_LINE, {
478
+ registry.registerCommand(debug_commands_1.DebugCommands.RUN_TO_LINE, {
846
479
  execute: async () => {
847
480
  const { model } = this.editors;
848
481
  if (model) {
@@ -853,11 +486,11 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
853
486
  isEnabled: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); },
854
487
  isVisible: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); }
855
488
  });
856
- registry.registerCommand(DebugCommands.RESTART_FRAME, {
489
+ registry.registerCommand(debug_commands_1.DebugCommands.RESTART_FRAME, {
857
490
  execute: () => this.selectedFrame && this.selectedFrame.restart(),
858
491
  isEnabled: () => !!this.selectedFrame
859
492
  });
860
- registry.registerCommand(DebugCommands.COPY_CALL_STACK, {
493
+ registry.registerCommand(debug_commands_1.DebugCommands.COPY_CALL_STACK, {
861
494
  execute: () => {
862
495
  const { frames } = this;
863
496
  const selection = document.getSelection();
@@ -869,22 +502,22 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
869
502
  isEnabled: () => document.queryCommandSupported('copy'),
870
503
  isVisible: () => document.queryCommandSupported('copy')
871
504
  });
872
- registry.registerCommand(DebugCommands.SET_VARIABLE_VALUE, {
505
+ registry.registerCommand(debug_commands_1.DebugCommands.SET_VARIABLE_VALUE, {
873
506
  execute: () => this.selectedVariable && this.selectedVariable.open(),
874
507
  isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable && !this.selectedVariable.readOnly,
875
508
  isVisible: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable
876
509
  });
877
- registry.registerCommand(DebugCommands.COPY_VARIABLE_VALUE, {
510
+ registry.registerCommand(debug_commands_1.DebugCommands.COPY_VARIABLE_VALUE, {
878
511
  execute: () => this.selectedVariable && this.selectedVariable.copyValue(),
879
512
  isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue,
880
513
  isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue
881
514
  });
882
- registry.registerCommand(DebugCommands.COPY_VARIABLE_AS_EXPRESSION, {
515
+ registry.registerCommand(debug_commands_1.DebugCommands.COPY_VARIABLE_AS_EXPRESSION, {
883
516
  execute: () => this.selectedVariable && this.selectedVariable.copyAsExpression(),
884
517
  isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression,
885
518
  isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression
886
519
  });
887
- registry.registerCommand(DebugCommands.WATCH_VARIABLE, {
520
+ registry.registerCommand(debug_commands_1.DebugCommands.WATCH_VARIABLE, {
888
521
  execute: () => {
889
522
  var _a;
890
523
  const evaluateName = (_a = this.selectedVariable) === null || _a === void 0 ? void 0 : _a.evaluateName;
@@ -896,62 +529,62 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
896
529
  isVisible: () => { var _a; return !!((_a = this.selectedVariable) === null || _a === void 0 ? void 0 : _a.evaluateName); },
897
530
  });
898
531
  // Debug context menu commands
899
- registry.registerCommand(DebugEditorContextCommands.ADD_BREAKPOINT, {
532
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.ADD_BREAKPOINT, {
900
533
  execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
901
534
  isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
902
535
  isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
903
536
  });
904
- registry.registerCommand(DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, {
537
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, {
905
538
  execute: position => this.isPosition(position) && this.editors.addBreakpoint('condition', this.asPosition(position)),
906
539
  isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
907
540
  isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
908
541
  });
909
- registry.registerCommand(DebugEditorContextCommands.ADD_LOGPOINT, {
542
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.ADD_LOGPOINT, {
910
543
  execute: position => this.isPosition(position) && this.editors.addBreakpoint('logMessage', this.asPosition(position)),
911
544
  isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
912
545
  isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
913
546
  });
914
- registry.registerCommand(DebugEditorContextCommands.REMOVE_BREAKPOINT, {
547
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.REMOVE_BREAKPOINT, {
915
548
  execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
916
549
  isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
917
550
  isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
918
551
  });
919
- registry.registerCommand(DebugEditorContextCommands.EDIT_BREAKPOINT, {
552
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.EDIT_BREAKPOINT, {
920
553
  execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
921
554
  isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
922
555
  isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
923
556
  });
924
- registry.registerCommand(DebugEditorContextCommands.ENABLE_BREAKPOINT, {
557
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.ENABLE_BREAKPOINT, {
925
558
  execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
926
559
  isEnabled: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false,
927
560
  isVisible: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false
928
561
  });
929
- registry.registerCommand(DebugEditorContextCommands.DISABLE_BREAKPOINT, {
562
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.DISABLE_BREAKPOINT, {
930
563
  execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
931
564
  isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position)),
932
565
  isVisible: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position))
933
566
  });
934
- registry.registerCommand(DebugEditorContextCommands.REMOVE_LOGPOINT, {
567
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.REMOVE_LOGPOINT, {
935
568
  execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
936
569
  isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
937
570
  isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
938
571
  });
939
- registry.registerCommand(DebugEditorContextCommands.EDIT_LOGPOINT, {
572
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.EDIT_LOGPOINT, {
940
573
  execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
941
574
  isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
942
575
  isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
943
576
  });
944
- registry.registerCommand(DebugEditorContextCommands.ENABLE_LOGPOINT, {
577
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.ENABLE_LOGPOINT, {
945
578
  execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
946
579
  isEnabled: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false,
947
580
  isVisible: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false
948
581
  });
949
- registry.registerCommand(DebugEditorContextCommands.DISABLE_LOGPOINT, {
582
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.DISABLE_LOGPOINT, {
950
583
  execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
951
584
  isEnabled: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position)),
952
585
  isVisible: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position))
953
586
  });
954
- registry.registerCommand(DebugEditorContextCommands.JUMP_TO_CURSOR, {
587
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.JUMP_TO_CURSOR, {
955
588
  execute: position => {
956
589
  if (this.isPosition(position) && this.editors.currentUri && this.manager.currentThread) {
957
590
  this.manager.currentThread.jumpToCursor(this.editors.currentUri, this.asPosition(position));
@@ -960,7 +593,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
960
593
  isEnabled: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto,
961
594
  isVisible: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto
962
595
  });
963
- registry.registerCommand(DebugEditorContextCommands.RUN_TO_LINE, {
596
+ registry.registerCommand(debug_commands_1.DebugEditorContextCommands.RUN_TO_LINE, {
964
597
  execute: async (position) => {
965
598
  if (this.isPosition(position)) {
966
599
  const { currentUri } = this.editors;
@@ -972,13 +605,13 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
972
605
  isEnabled: position => { var _a; return this.isPosition(position) && !!this.editors.currentUri && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); },
973
606
  isVisible: position => { var _a; return this.isPosition(position) && !!this.editors.currentUri && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); }
974
607
  });
975
- registry.registerCommand(DebugBreakpointWidgetCommands.ACCEPT, {
608
+ registry.registerCommand(debug_commands_1.DebugBreakpointWidgetCommands.ACCEPT, {
976
609
  execute: () => this.editors.acceptBreakpoint()
977
610
  });
978
- registry.registerCommand(DebugBreakpointWidgetCommands.CLOSE, {
611
+ registry.registerCommand(debug_commands_1.DebugBreakpointWidgetCommands.CLOSE, {
979
612
  execute: () => this.editors.closeBreakpoint()
980
613
  });
981
- registry.registerCommand(DebugCommands.ADD_WATCH_EXPRESSION, {
614
+ registry.registerCommand(debug_commands_1.DebugCommands.ADD_WATCH_EXPRESSION, {
982
615
  execute: widget => {
983
616
  if (widget instanceof browser_1.Widget) {
984
617
  if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
@@ -992,7 +625,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
992
625
  isEnabled: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch,
993
626
  isVisible: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch
994
627
  });
995
- registry.registerCommand(DebugCommands.EDIT_WATCH_EXPRESSION, {
628
+ registry.registerCommand(debug_commands_1.DebugCommands.EDIT_WATCH_EXPRESSION, {
996
629
  execute: () => {
997
630
  const { watchExpression } = this;
998
631
  if (watchExpression) {
@@ -1002,12 +635,12 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
1002
635
  isEnabled: () => !!this.watchExpression,
1003
636
  isVisible: () => !!this.watchExpression
1004
637
  });
1005
- registry.registerCommand(DebugCommands.COPY_WATCH_EXPRESSION_VALUE, {
638
+ registry.registerCommand(debug_commands_1.DebugCommands.COPY_WATCH_EXPRESSION_VALUE, {
1006
639
  execute: () => this.watchExpression && this.watchExpression.copyValue(),
1007
640
  isEnabled: () => !!this.watchExpression && this.watchExpression.supportCopyValue,
1008
641
  isVisible: () => !!this.watchExpression && this.watchExpression.supportCopyValue
1009
642
  });
1010
- registry.registerCommand(DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS, {
643
+ registry.registerCommand(debug_commands_1.DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS, {
1011
644
  execute: widget => {
1012
645
  if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
1013
646
  const root = widget.model.root;
@@ -1017,7 +650,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
1017
650
  isEnabled: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget,
1018
651
  isVisible: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget
1019
652
  });
1020
- registry.registerCommand(DebugCommands.REMOVE_WATCH_EXPRESSION, {
653
+ registry.registerCommand(debug_commands_1.DebugCommands.REMOVE_WATCH_EXPRESSION, {
1021
654
  execute: () => {
1022
655
  const { watch, watchExpression } = this;
1023
656
  if (watch && watchExpression) {
@@ -1027,7 +660,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
1027
660
  isEnabled: () => !!this.watchExpression,
1028
661
  isVisible: () => !!this.watchExpression
1029
662
  });
1030
- registry.registerCommand(DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS, {
663
+ registry.registerCommand(debug_commands_1.DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS, {
1031
664
  execute: widget => {
1032
665
  if (widget instanceof browser_1.Widget) {
1033
666
  if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
@@ -1045,129 +678,115 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
1045
678
  registerKeybindings(keybindings) {
1046
679
  super.registerKeybindings(keybindings);
1047
680
  keybindings.registerKeybinding({
1048
- command: DebugCommands.START.id,
681
+ command: debug_commands_1.DebugCommands.START.id,
1049
682
  keybinding: 'f5',
1050
683
  when: '!inDebugMode'
1051
684
  });
1052
685
  keybindings.registerKeybinding({
1053
- command: DebugCommands.START_NO_DEBUG.id,
686
+ command: debug_commands_1.DebugCommands.START_NO_DEBUG.id,
1054
687
  keybinding: 'ctrl+f5',
1055
688
  when: '!inDebugMode'
1056
689
  });
1057
690
  keybindings.registerKeybinding({
1058
- command: DebugCommands.STOP.id,
691
+ command: debug_commands_1.DebugCommands.STOP.id,
1059
692
  keybinding: 'shift+f5',
1060
693
  when: 'inDebugMode'
1061
694
  });
1062
695
  keybindings.registerKeybinding({
1063
- command: DebugCommands.RESTART.id,
696
+ command: debug_commands_1.DebugCommands.RESTART.id,
1064
697
  keybinding: 'shift+ctrlcmd+f5',
1065
698
  when: 'inDebugMode'
1066
699
  });
1067
700
  keybindings.registerKeybinding({
1068
- command: DebugCommands.STEP_OVER.id,
701
+ command: debug_commands_1.DebugCommands.STEP_OVER.id,
1069
702
  keybinding: 'f10',
1070
703
  when: 'inDebugMode'
1071
704
  });
1072
705
  keybindings.registerKeybinding({
1073
- command: DebugCommands.STEP_INTO.id,
706
+ command: debug_commands_1.DebugCommands.STEP_INTO.id,
1074
707
  keybinding: 'f11',
1075
708
  when: 'inDebugMode'
1076
709
  });
1077
710
  keybindings.registerKeybinding({
1078
- command: DebugCommands.STEP_OUT.id,
711
+ command: debug_commands_1.DebugCommands.STEP_OUT.id,
1079
712
  keybinding: 'shift+f11',
1080
713
  when: 'inDebugMode'
1081
714
  });
1082
715
  keybindings.registerKeybinding({
1083
- command: DebugCommands.CONTINUE.id,
716
+ command: debug_commands_1.DebugCommands.CONTINUE.id,
1084
717
  keybinding: 'f5',
1085
718
  when: 'inDebugMode'
1086
719
  });
1087
720
  keybindings.registerKeybinding({
1088
- command: DebugCommands.PAUSE.id,
721
+ command: debug_commands_1.DebugCommands.PAUSE.id,
1089
722
  keybinding: 'f6',
1090
723
  when: 'inDebugMode'
1091
724
  });
1092
725
  keybindings.registerKeybinding({
1093
- command: DebugCommands.TOGGLE_BREAKPOINT.id,
726
+ command: debug_commands_1.DebugCommands.TOGGLE_BREAKPOINT.id,
1094
727
  keybinding: 'f9',
1095
728
  when: 'editorTextFocus'
1096
729
  });
1097
730
  keybindings.registerKeybinding({
1098
- command: DebugCommands.INLINE_BREAKPOINT.id,
731
+ command: debug_commands_1.DebugCommands.INLINE_BREAKPOINT.id,
1099
732
  keybinding: 'shift+f9',
1100
733
  when: 'editorTextFocus'
1101
734
  });
1102
735
  keybindings.registerKeybinding({
1103
- command: DebugBreakpointWidgetCommands.ACCEPT.id,
736
+ command: debug_commands_1.DebugBreakpointWidgetCommands.ACCEPT.id,
1104
737
  keybinding: 'enter',
1105
738
  when: 'breakpointWidgetFocus && !suggestWidgetVisible'
1106
739
  });
1107
740
  keybindings.registerKeybinding({
1108
- command: DebugBreakpointWidgetCommands.CLOSE.id,
741
+ command: debug_commands_1.DebugBreakpointWidgetCommands.CLOSE.id,
1109
742
  keybinding: 'esc',
1110
743
  when: 'isBreakpointWidgetVisible || (breakpointWidgetFocus && !suggestWidgetVisible)'
1111
744
  });
1112
745
  }
1113
746
  registerToolbarItems(toolbar) {
1114
- const onDidChangeToggleBreakpointsEnabled = new common_1.Emitter();
1115
- const toggleBreakpointsEnabled = {
1116
- id: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
1117
- command: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
1118
- icon: (0, browser_1.codicon)('activate-breakpoints'),
1119
- onDidChange: onDidChangeToggleBreakpointsEnabled.event,
1120
- priority: 1
1121
- };
1122
- const updateToggleBreakpointsEnabled = () => {
1123
- const activateBreakpoints = nls_1.nls.localizeByDefault('Enable All Breakpoints');
1124
- const deactivateBreakpoints = nls_1.nls.localizeByDefault('Disable All Breakpoints');
1125
- const tooltip = this.breakpointManager.breakpointsEnabled ? deactivateBreakpoints : activateBreakpoints;
1126
- if (toggleBreakpointsEnabled.tooltip !== tooltip) {
1127
- toggleBreakpointsEnabled.tooltip = tooltip;
1128
- onDidChangeToggleBreakpointsEnabled.fire(undefined);
1129
- }
1130
- };
1131
747
  toolbar.registerItem({
1132
- id: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
1133
- command: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
748
+ id: debug_commands_1.DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
749
+ command: debug_commands_1.DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
1134
750
  icon: (0, browser_1.codicon)('add'),
1135
- tooltip: DebugCommands.ADD_FUNCTION_BREAKPOINT.label
751
+ tooltip: debug_commands_1.DebugCommands.ADD_FUNCTION_BREAKPOINT.label
1136
752
  });
1137
753
  toolbar.registerItem({
1138
- id: DebugCommands.ADD_DATA_BREAKPOINT.id,
1139
- command: DebugCommands.ADD_DATA_BREAKPOINT.id,
754
+ id: debug_commands_1.DebugCommands.ADD_DATA_BREAKPOINT.id,
755
+ command: debug_commands_1.DebugCommands.ADD_DATA_BREAKPOINT.id,
1140
756
  icon: (0, browser_1.codicon)('variable-group'),
1141
- tooltip: DebugCommands.ADD_DATA_BREAKPOINT.label,
757
+ tooltip: debug_commands_1.DebugCommands.ADD_DATA_BREAKPOINT.label,
1142
758
  onDidChange: this.manager.onDidStopDebugSession
1143
759
  });
1144
- updateToggleBreakpointsEnabled();
1145
- this.breakpointManager.onDidChangeBreakpoints(updateToggleBreakpointsEnabled);
1146
- toolbar.registerItem(toggleBreakpointsEnabled);
1147
760
  toolbar.registerItem({
1148
- id: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
1149
- command: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
761
+ id: debug_commands_1.DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
762
+ command: debug_commands_1.DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
763
+ icon: (0, browser_1.codicon)('activate-breakpoints'),
764
+ priority: 1
765
+ });
766
+ toolbar.registerItem({
767
+ id: debug_commands_1.DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
768
+ command: debug_commands_1.DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
1150
769
  icon: (0, browser_1.codicon)('close-all'),
1151
770
  priority: 2
1152
771
  });
1153
772
  toolbar.registerItem({
1154
- id: DebugCommands.ADD_WATCH_EXPRESSION.id,
1155
- command: DebugCommands.ADD_WATCH_EXPRESSION.id,
773
+ id: debug_commands_1.DebugCommands.ADD_WATCH_EXPRESSION.id,
774
+ command: debug_commands_1.DebugCommands.ADD_WATCH_EXPRESSION.id,
1156
775
  icon: (0, browser_1.codicon)('add'),
1157
- tooltip: DebugCommands.ADD_WATCH_EXPRESSION.label
776
+ tooltip: debug_commands_1.DebugCommands.ADD_WATCH_EXPRESSION.label
1158
777
  });
1159
778
  toolbar.registerItem({
1160
- id: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
1161
- command: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
779
+ id: debug_commands_1.DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
780
+ command: debug_commands_1.DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
1162
781
  icon: (0, browser_1.codicon)('collapse-all'),
1163
- tooltip: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.label,
782
+ tooltip: debug_commands_1.DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.label,
1164
783
  priority: 1
1165
784
  });
1166
785
  toolbar.registerItem({
1167
- id: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
1168
- command: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
786
+ id: debug_commands_1.DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
787
+ command: debug_commands_1.DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
1169
788
  icon: (0, browser_1.codicon)('close-all'),
1170
- tooltip: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.label,
789
+ tooltip: debug_commands_1.DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.label,
1171
790
  priority: 2
1172
791
  });
1173
792
  }
@@ -1177,7 +796,11 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
1177
796
  ...options
1178
797
  };
1179
798
  const debugWidget = await this.openView({ reveal });
1180
- debugWidget.sessionManager.currentSession = session;
799
+ // Only switch to this session if it has a stopped thread
800
+ // Don't switch to background sessions that are just starting up
801
+ if (session.currentThread && session.currentThread.stopped) {
802
+ debugWidget.sessionManager.currentSession = session;
803
+ }
1181
804
  return debugWidget['sessionWidget'];
1182
805
  }
1183
806
  revealSession(session) {