@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.
- package/lib/browser/breakpoint/breakpoint-manager.js +1 -1
- package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -1
- package/lib/browser/debug-commands.d.ts +153 -0
- package/lib/browser/debug-commands.d.ts.map +1 -0
- package/lib/browser/debug-commands.js +399 -0
- package/lib/browser/debug-commands.js.map +1 -0
- package/lib/browser/debug-frontend-application-contribution.d.ts +1 -150
- package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.js +155 -532
- package/lib/browser/debug-frontend-application-contribution.js.map +1 -1
- package/lib/browser/debug-prefix-configuration.js +3 -3
- package/lib/browser/debug-prefix-configuration.js.map +1 -1
- package/lib/browser/debug-session-contribution.d.ts +2 -1
- package/lib/browser/debug-session-contribution.d.ts.map +1 -1
- package/lib/browser/debug-session-contribution.js +5 -1
- package/lib/browser/debug-session-contribution.js.map +1 -1
- package/lib/browser/debug-session-manager.d.ts +4 -3
- package/lib/browser/debug-session-manager.d.ts.map +1 -1
- package/lib/browser/debug-session-manager.js +46 -8
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session.d.ts +3 -2
- package/lib/browser/debug-session.d.ts.map +1 -1
- package/lib/browser/debug-session.js +4 -3
- package/lib/browser/debug-session.js.map +1 -1
- package/lib/browser/model/debug-breakpoint.d.ts +4 -2
- package/lib/browser/model/debug-breakpoint.d.ts.map +1 -1
- package/lib/browser/model/debug-breakpoint.js +10 -2
- package/lib/browser/model/debug-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-data-breakpoint.d.ts +2 -0
- package/lib/browser/model/debug-data-breakpoint.d.ts.map +1 -1
- package/lib/browser/model/debug-data-breakpoint.js +16 -5
- package/lib/browser/model/debug-data-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-function-breakpoint.d.ts +3 -0
- package/lib/browser/model/debug-function-breakpoint.d.ts.map +1 -1
- package/lib/browser/model/debug-function-breakpoint.js +17 -1
- package/lib/browser/model/debug-function-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-instruction-breakpoint.d.ts +2 -0
- package/lib/browser/model/debug-instruction-breakpoint.d.ts.map +1 -1
- package/lib/browser/model/debug-instruction-breakpoint.js +13 -1
- package/lib/browser/model/debug-instruction-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-source-breakpoint.d.ts +6 -1
- package/lib/browser/model/debug-source-breakpoint.d.ts.map +1 -1
- package/lib/browser/model/debug-source-breakpoint.js +17 -1
- package/lib/browser/model/debug-source-breakpoint.js.map +1 -1
- package/lib/browser/view/debug-action.d.ts +1 -0
- package/lib/browser/view/debug-action.d.ts.map +1 -1
- package/lib/browser/view/debug-action.js +2 -2
- package/lib/browser/view/debug-action.js.map +1 -1
- package/lib/browser/view/debug-breakpoints-source.d.ts +2 -0
- package/lib/browser/view/debug-breakpoints-source.d.ts.map +1 -1
- package/lib/browser/view/debug-breakpoints-source.js +6 -1
- package/lib/browser/view/debug-breakpoints-source.js.map +1 -1
- package/lib/browser/view/debug-configuration-widget.js +2 -2
- package/lib/browser/view/debug-configuration-widget.js.map +1 -1
- package/lib/browser/view/debug-exception-breakpoint.d.ts +9 -2
- package/lib/browser/view/debug-exception-breakpoint.d.ts.map +1 -1
- package/lib/browser/view/debug-exception-breakpoint.js +26 -5
- package/lib/browser/view/debug-exception-breakpoint.js.map +1 -1
- package/lib/browser/view/debug-session-widget.d.ts +0 -1
- package/lib/browser/view/debug-session-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-session-widget.js +0 -4
- package/lib/browser/view/debug-session-widget.js.map +1 -1
- package/lib/browser/view/debug-threads-widget.d.ts +6 -1
- package/lib/browser/view/debug-threads-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-threads-widget.js +69 -5
- package/lib/browser/view/debug-threads-widget.js.map +1 -1
- package/lib/browser/view/debug-toolbar-widget.d.ts +5 -18
- package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-toolbar-widget.js +14 -58
- package/lib/browser/view/debug-toolbar-widget.js.map +1 -1
- package/lib/browser/view/debug-view-model.d.ts.map +1 -1
- package/lib/browser/view/debug-view-model.js +8 -9
- package/lib/browser/view/debug-view-model.js.map +1 -1
- package/package.json +16 -16
- package/src/browser/breakpoint/breakpoint-manager.ts +1 -1
- package/src/browser/debug-commands.ts +402 -0
- package/src/browser/debug-frontend-application-contribution.ts +35 -410
- package/src/browser/debug-prefix-configuration.ts +1 -1
- package/src/browser/debug-session-contribution.ts +5 -2
- package/src/browser/debug-session-manager.ts +52 -9
- package/src/browser/debug-session.tsx +4 -3
- package/src/browser/model/debug-breakpoint.tsx +12 -3
- package/src/browser/model/debug-data-breakpoint.tsx +21 -6
- package/src/browser/model/debug-function-breakpoint.tsx +22 -1
- package/src/browser/model/debug-instruction-breakpoint.tsx +16 -1
- package/src/browser/model/debug-source-breakpoint.tsx +24 -3
- package/src/browser/style/index.css +13 -5
- package/src/browser/view/debug-action.tsx +3 -2
- package/src/browser/view/debug-breakpoints-source.tsx +5 -1
- package/src/browser/view/debug-configuration-widget.tsx +1 -1
- package/src/browser/view/debug-exception-breakpoint.tsx +30 -5
- package/src/browser/view/debug-session-widget.ts +0 -5
- package/src/browser/view/debug-threads-widget.ts +84 -6
- package/src/browser/view/debug-toolbar-widget.tsx +13 -60
- package/src/browser/view/debug-view-model.ts +8 -9
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import { TreeElementNode } from '@theia/core/lib/browser/source-tree';
|
|
21
21
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
22
22
|
import * as monaco from '@theia/monaco-editor-core';
|
|
23
|
-
import { MenuModelRegistry, CommandRegistry,
|
|
23
|
+
import { MenuModelRegistry, CommandRegistry, Command, URI, Event, MessageService, CancellationError } from '@theia/core/lib/common';
|
|
24
24
|
import { waitForEvent } from '@theia/core/lib/common/promise-util';
|
|
25
25
|
import { EDITOR_CONTEXT_MENU, EDITOR_LINENUMBER_CONTEXT_MENU, EditorManager } from '@theia/editor/lib/browser';
|
|
26
26
|
import { DebugSessionManager } from './debug-session-manager';
|
|
@@ -44,7 +44,7 @@ import { DebugConsoleContribution } from './console/debug-console-contribution';
|
|
|
44
44
|
import { DebugService } from '../common/debug-service';
|
|
45
45
|
import { DebugSchemaUpdater } from './debug-schema-updater';
|
|
46
46
|
import { DebugPreferences } from '../common/debug-preferences';
|
|
47
|
-
import {
|
|
47
|
+
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
48
48
|
import { DebugWatchWidget } from './view/debug-watch-widget';
|
|
49
49
|
import { DebugWatchExpression } from './view/debug-watch-expression';
|
|
50
50
|
import { DebugWatchManager } from './debug-watch-manager';
|
|
@@ -64,387 +64,10 @@ import { ConsoleContextMenu } from '@theia/console/lib/browser/console-contribut
|
|
|
64
64
|
import { DebugHoverWidget } from './editor/debug-hover-widget';
|
|
65
65
|
import { DebugExpressionProvider } from './editor/debug-expression-provider';
|
|
66
66
|
import { AddOrEditDataBreakpointAddress } from './breakpoint/debug-data-breakpoint-actions';
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export const DEBUG_CONFIGURATION = [...DEBUG, 'b_configuration'];
|
|
72
|
-
export const DEBUG_THREADS = [...DEBUG, 'c_threads'];
|
|
73
|
-
export const DEBUG_SESSIONS = [...DEBUG, 'd_sessions'];
|
|
74
|
-
export const DEBUG_BREAKPOINT = [...DEBUG, 'e_breakpoint'];
|
|
75
|
-
export const DEBUG_NEW_BREAKPOINT = [...DEBUG_BREAKPOINT, 'a_new_breakpoint'];
|
|
76
|
-
export const DEBUG_BREAKPOINTS = [...DEBUG, 'f_breakpoints'];
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function nlsEditBreakpoint(breakpoint: string): string {
|
|
80
|
-
return nls.localizeByDefault('Edit {0}...', nls.localizeByDefault(breakpoint));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function nlsRemoveBreakpoint(breakpoint: string): string {
|
|
84
|
-
return nls.localizeByDefault('Remove {0}', nls.localizeByDefault(breakpoint));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function nlsEnableBreakpoint(breakpoint: string): string {
|
|
88
|
-
return nls.localizeByDefault('Enable {0}', nls.localizeByDefault(breakpoint));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function nlsDisableBreakpoint(breakpoint: string): string {
|
|
92
|
-
return nls.localizeByDefault('Disable {0}', nls.localizeByDefault(breakpoint));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export namespace DebugCommands {
|
|
96
|
-
|
|
97
|
-
export const DEBUG_CATEGORY = 'Debug';
|
|
98
|
-
export const DEBUG_CATEGORY_KEY = nls.getDefaultKey(DEBUG_CATEGORY);
|
|
99
|
-
|
|
100
|
-
export const START = Command.toDefaultLocalizedCommand({
|
|
101
|
-
id: 'workbench.action.debug.start',
|
|
102
|
-
category: DEBUG_CATEGORY,
|
|
103
|
-
label: 'Start Debugging',
|
|
104
|
-
iconClass: codicon('debug-alt')
|
|
105
|
-
});
|
|
106
|
-
export const START_NO_DEBUG = Command.toDefaultLocalizedCommand({
|
|
107
|
-
id: 'workbench.action.debug.run',
|
|
108
|
-
category: DEBUG_CATEGORY,
|
|
109
|
-
label: 'Start Without Debugging'
|
|
110
|
-
});
|
|
111
|
-
export const STOP = Command.toDefaultLocalizedCommand({
|
|
112
|
-
id: 'workbench.action.debug.stop',
|
|
113
|
-
category: DEBUG_CATEGORY,
|
|
114
|
-
label: 'Stop',
|
|
115
|
-
iconClass: codicon('debug-stop')
|
|
116
|
-
});
|
|
117
|
-
export const RESTART = Command.toDefaultLocalizedCommand({
|
|
118
|
-
id: 'workbench.action.debug.restart',
|
|
119
|
-
category: DEBUG_CATEGORY,
|
|
120
|
-
label: 'Restart',
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
export const OPEN_CONFIGURATIONS = Command.toDefaultLocalizedCommand({
|
|
124
|
-
id: 'debug.configurations.open',
|
|
125
|
-
category: DEBUG_CATEGORY,
|
|
126
|
-
label: 'Open Configurations'
|
|
127
|
-
});
|
|
128
|
-
export const ADD_CONFIGURATION = Command.toDefaultLocalizedCommand({
|
|
129
|
-
id: 'debug.configurations.add',
|
|
130
|
-
category: DEBUG_CATEGORY,
|
|
131
|
-
label: 'Add Configuration...'
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
export const STEP_OVER = Command.toDefaultLocalizedCommand({
|
|
135
|
-
id: 'workbench.action.debug.stepOver',
|
|
136
|
-
category: DEBUG_CATEGORY,
|
|
137
|
-
label: 'Step Over',
|
|
138
|
-
iconClass: codicon('debug-step-over')
|
|
139
|
-
});
|
|
140
|
-
export const STEP_INTO = Command.toDefaultLocalizedCommand({
|
|
141
|
-
id: 'workbench.action.debug.stepInto',
|
|
142
|
-
category: DEBUG_CATEGORY,
|
|
143
|
-
label: 'Step Into',
|
|
144
|
-
iconClass: codicon('debug-step-into')
|
|
145
|
-
});
|
|
146
|
-
export const STEP_OUT = Command.toDefaultLocalizedCommand({
|
|
147
|
-
id: 'workbench.action.debug.stepOut',
|
|
148
|
-
category: DEBUG_CATEGORY,
|
|
149
|
-
label: 'Step Out',
|
|
150
|
-
iconClass: codicon('debug-step-out')
|
|
151
|
-
});
|
|
152
|
-
export const CONTINUE = Command.toDefaultLocalizedCommand({
|
|
153
|
-
id: 'workbench.action.debug.continue',
|
|
154
|
-
category: DEBUG_CATEGORY,
|
|
155
|
-
label: 'Continue',
|
|
156
|
-
iconClass: codicon('debug-continue')
|
|
157
|
-
});
|
|
158
|
-
export const PAUSE = Command.toDefaultLocalizedCommand({
|
|
159
|
-
id: 'workbench.action.debug.pause',
|
|
160
|
-
category: DEBUG_CATEGORY,
|
|
161
|
-
label: 'Pause',
|
|
162
|
-
iconClass: codicon('debug-pause')
|
|
163
|
-
});
|
|
164
|
-
export const CONTINUE_ALL = Command.toLocalizedCommand({
|
|
165
|
-
id: 'debug.thread.continue.all',
|
|
166
|
-
category: DEBUG_CATEGORY,
|
|
167
|
-
label: 'Continue All',
|
|
168
|
-
iconClass: codicon('debug-continue')
|
|
169
|
-
}, 'theia/debug/continueAll', DEBUG_CATEGORY_KEY);
|
|
170
|
-
export const PAUSE_ALL = Command.toLocalizedCommand({
|
|
171
|
-
id: 'debug.thread.pause.all',
|
|
172
|
-
category: DEBUG_CATEGORY,
|
|
173
|
-
label: 'Pause All',
|
|
174
|
-
iconClass: codicon('debug-pause')
|
|
175
|
-
}, 'theia/debug/pauseAll', DEBUG_CATEGORY_KEY);
|
|
176
|
-
|
|
177
|
-
export const TOGGLE_BREAKPOINT = Command.toDefaultLocalizedCommand({
|
|
178
|
-
id: 'editor.debug.action.toggleBreakpoint',
|
|
179
|
-
category: DEBUG_CATEGORY,
|
|
180
|
-
label: 'Toggle Breakpoint',
|
|
181
|
-
});
|
|
182
|
-
export const INLINE_BREAKPOINT = Command.toDefaultLocalizedCommand({
|
|
183
|
-
id: 'editor.debug.action.inlineBreakpoint',
|
|
184
|
-
category: DEBUG_CATEGORY,
|
|
185
|
-
label: 'Inline Breakpoint',
|
|
186
|
-
});
|
|
187
|
-
export const ADD_CONDITIONAL_BREAKPOINT = Command.toDefaultLocalizedCommand({
|
|
188
|
-
id: 'debug.breakpoint.add.conditional',
|
|
189
|
-
category: DEBUG_CATEGORY,
|
|
190
|
-
label: 'Add Conditional Breakpoint...',
|
|
191
|
-
});
|
|
192
|
-
export const ADD_LOGPOINT = Command.toDefaultLocalizedCommand({
|
|
193
|
-
id: 'debug.breakpoint.add.logpoint',
|
|
194
|
-
category: DEBUG_CATEGORY,
|
|
195
|
-
label: 'Add Logpoint...',
|
|
196
|
-
});
|
|
197
|
-
export const ADD_FUNCTION_BREAKPOINT = Command.toDefaultLocalizedCommand({
|
|
198
|
-
id: 'debug.breakpoint.add.function',
|
|
199
|
-
category: DEBUG_CATEGORY,
|
|
200
|
-
label: 'Add Function Breakpoint',
|
|
201
|
-
});
|
|
202
|
-
export const ADD_DATA_BREAKPOINT = Command.toDefaultLocalizedCommand({
|
|
203
|
-
id: 'debug.breakpoint.add.data',
|
|
204
|
-
category: DEBUG_CATEGORY,
|
|
205
|
-
label: 'Add Data Breakpoint at Address'
|
|
206
|
-
});
|
|
207
|
-
export const ENABLE_SELECTED_BREAKPOINTS = Command.toLocalizedCommand({
|
|
208
|
-
id: 'debug.breakpoint.enableSelected',
|
|
209
|
-
category: DEBUG_CATEGORY,
|
|
210
|
-
label: 'Enable Selected Breakpoints',
|
|
211
|
-
}, 'theia/debug/enableSelectedBreakpoints', DEBUG_CATEGORY_KEY);
|
|
212
|
-
export const ENABLE_ALL_BREAKPOINTS = Command.toDefaultLocalizedCommand({
|
|
213
|
-
id: 'debug.breakpoint.enableAll',
|
|
214
|
-
category: DEBUG_CATEGORY,
|
|
215
|
-
label: 'Enable All Breakpoints',
|
|
216
|
-
});
|
|
217
|
-
export const DISABLE_SELECTED_BREAKPOINTS = Command.toLocalizedCommand({
|
|
218
|
-
id: 'debug.breakpoint.disableSelected',
|
|
219
|
-
category: DEBUG_CATEGORY,
|
|
220
|
-
label: 'Disable Selected Breakpoints',
|
|
221
|
-
}, 'theia/debug/disableSelectedBreakpoints', DEBUG_CATEGORY_KEY);
|
|
222
|
-
export const DISABLE_ALL_BREAKPOINTS = Command.toDefaultLocalizedCommand({
|
|
223
|
-
id: 'debug.breakpoint.disableAll',
|
|
224
|
-
category: DEBUG_CATEGORY,
|
|
225
|
-
label: 'Disable All Breakpoints',
|
|
226
|
-
});
|
|
227
|
-
export const EDIT_BREAKPOINT = Command.toLocalizedCommand({
|
|
228
|
-
id: 'debug.breakpoint.edit',
|
|
229
|
-
category: DEBUG_CATEGORY,
|
|
230
|
-
originalLabel: 'Edit Breakpoint...',
|
|
231
|
-
label: nlsEditBreakpoint('Breakpoint')
|
|
232
|
-
}, '', DEBUG_CATEGORY_KEY);
|
|
233
|
-
export const EDIT_LOGPOINT = Command.toLocalizedCommand({
|
|
234
|
-
id: 'debug.logpoint.edit',
|
|
235
|
-
category: DEBUG_CATEGORY,
|
|
236
|
-
originalLabel: 'Edit Logpoint...',
|
|
237
|
-
label: nlsEditBreakpoint('Logpoint')
|
|
238
|
-
}, '', DEBUG_CATEGORY_KEY);
|
|
239
|
-
export const EDIT_BREAKPOINT_CONDITION = Command.toLocalizedCommand({
|
|
240
|
-
id: 'debug.breakpoint.editCondition',
|
|
241
|
-
category: DEBUG_CATEGORY,
|
|
242
|
-
label: 'Edit Condition...'
|
|
243
|
-
}, '', DEBUG_CATEGORY_KEY);
|
|
244
|
-
export const REMOVE_BREAKPOINT = Command.toLocalizedCommand({
|
|
245
|
-
id: 'debug.breakpoint.remove',
|
|
246
|
-
category: DEBUG_CATEGORY,
|
|
247
|
-
originalLabel: 'Remove Breakpoint',
|
|
248
|
-
label: nlsRemoveBreakpoint('Breakpoint')
|
|
249
|
-
}, '', DEBUG_CATEGORY_KEY);
|
|
250
|
-
export const REMOVE_LOGPOINT = Command.toLocalizedCommand({
|
|
251
|
-
id: 'debug.logpoint.remove',
|
|
252
|
-
category: DEBUG_CATEGORY,
|
|
253
|
-
originalLabel: 'Remove Logpoint',
|
|
254
|
-
label: nlsRemoveBreakpoint('Logpoint')
|
|
255
|
-
}, '', DEBUG_CATEGORY_KEY);
|
|
256
|
-
export const REMOVE_SELECTED_BREAKPOINTS = Command.toLocalizedCommand({
|
|
257
|
-
id: 'debug.breakpoint.removeSelected',
|
|
258
|
-
category: DEBUG_CATEGORY,
|
|
259
|
-
label: 'Remove Selected Breakpoints',
|
|
260
|
-
}, '', DEBUG_CATEGORY_KEY);
|
|
261
|
-
export const REMOVE_ALL_BREAKPOINTS = Command.toDefaultLocalizedCommand({
|
|
262
|
-
id: 'debug.breakpoint.removeAll',
|
|
263
|
-
category: DEBUG_CATEGORY,
|
|
264
|
-
label: 'Remove All Breakpoints',
|
|
265
|
-
});
|
|
266
|
-
export const TOGGLE_BREAKPOINTS_ENABLED = Command.toLocalizedCommand({
|
|
267
|
-
id: 'debug.breakpoint.toggleEnabled'
|
|
268
|
-
});
|
|
269
|
-
export const SHOW_HOVER = Command.toDefaultLocalizedCommand({
|
|
270
|
-
id: 'editor.debug.action.showDebugHover',
|
|
271
|
-
label: 'Debug: Show Hover'
|
|
272
|
-
});
|
|
273
|
-
export const EVALUATE_IN_DEBUG_CONSOLE = Command.toDefaultLocalizedCommand({
|
|
274
|
-
id: 'editor.debug.action.selectionToRepl',
|
|
275
|
-
category: DEBUG_CATEGORY,
|
|
276
|
-
label: 'Evaluate in Debug Console'
|
|
277
|
-
});
|
|
278
|
-
export const ADD_TO_WATCH = Command.toDefaultLocalizedCommand({
|
|
279
|
-
id: 'editor.debug.action.selectionToWatch',
|
|
280
|
-
category: DEBUG_CATEGORY,
|
|
281
|
-
label: 'Add to Watch'
|
|
282
|
-
});
|
|
283
|
-
export const JUMP_TO_CURSOR = Command.toDefaultLocalizedCommand({
|
|
284
|
-
id: 'editor.debug.action.jumpToCursor',
|
|
285
|
-
category: DEBUG_CATEGORY,
|
|
286
|
-
label: 'Jump to Cursor'
|
|
287
|
-
});
|
|
288
|
-
export const RUN_TO_CURSOR = Command.toDefaultLocalizedCommand({
|
|
289
|
-
id: 'editor.debug.action.runToCursor',
|
|
290
|
-
category: DEBUG_CATEGORY,
|
|
291
|
-
label: 'Run to Cursor'
|
|
292
|
-
});
|
|
293
|
-
export const RUN_TO_LINE = Command.toDefaultLocalizedCommand({
|
|
294
|
-
id: 'editor.debug.action.runToLine',
|
|
295
|
-
category: DEBUG_CATEGORY,
|
|
296
|
-
label: 'Run to Line'
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
export const RESTART_FRAME = Command.toDefaultLocalizedCommand({
|
|
300
|
-
id: 'debug.frame.restart',
|
|
301
|
-
category: DEBUG_CATEGORY,
|
|
302
|
-
label: 'Restart Frame',
|
|
303
|
-
});
|
|
304
|
-
export const COPY_CALL_STACK = Command.toDefaultLocalizedCommand({
|
|
305
|
-
id: 'debug.callStack.copy',
|
|
306
|
-
category: DEBUG_CATEGORY,
|
|
307
|
-
label: 'Copy Call Stack',
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
export const SET_VARIABLE_VALUE = Command.toDefaultLocalizedCommand({
|
|
311
|
-
id: 'debug.variable.setValue',
|
|
312
|
-
category: DEBUG_CATEGORY,
|
|
313
|
-
label: 'Set Value',
|
|
314
|
-
});
|
|
315
|
-
export const COPY_VARIABLE_VALUE = Command.toDefaultLocalizedCommand({
|
|
316
|
-
id: 'debug.variable.copyValue',
|
|
317
|
-
category: DEBUG_CATEGORY,
|
|
318
|
-
label: 'Copy Value',
|
|
319
|
-
});
|
|
320
|
-
export const COPY_VARIABLE_AS_EXPRESSION = Command.toDefaultLocalizedCommand({
|
|
321
|
-
id: 'debug.variable.copyAsExpression',
|
|
322
|
-
category: DEBUG_CATEGORY,
|
|
323
|
-
label: 'Copy as Expression',
|
|
324
|
-
});
|
|
325
|
-
export const WATCH_VARIABLE = Command.toDefaultLocalizedCommand({
|
|
326
|
-
id: 'debug.variable.watch',
|
|
327
|
-
category: DEBUG_CATEGORY,
|
|
328
|
-
label: 'Add to Watch',
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
export const ADD_WATCH_EXPRESSION = Command.toDefaultLocalizedCommand({
|
|
332
|
-
id: 'debug.watch.addExpression',
|
|
333
|
-
category: DEBUG_CATEGORY,
|
|
334
|
-
label: 'Add Expression'
|
|
335
|
-
});
|
|
336
|
-
export const EDIT_WATCH_EXPRESSION = Command.toDefaultLocalizedCommand({
|
|
337
|
-
id: 'debug.watch.editExpression',
|
|
338
|
-
category: DEBUG_CATEGORY,
|
|
339
|
-
label: 'Edit Expression'
|
|
340
|
-
});
|
|
341
|
-
export const COPY_WATCH_EXPRESSION_VALUE = Command.toLocalizedCommand({
|
|
342
|
-
id: 'debug.watch.copyExpressionValue',
|
|
343
|
-
category: DEBUG_CATEGORY,
|
|
344
|
-
label: 'Copy Expression Value'
|
|
345
|
-
}, 'theia/debug/copyExpressionValue', DEBUG_CATEGORY_KEY);
|
|
346
|
-
export const REMOVE_WATCH_EXPRESSION = Command.toDefaultLocalizedCommand({
|
|
347
|
-
id: 'debug.watch.removeExpression',
|
|
348
|
-
category: DEBUG_CATEGORY,
|
|
349
|
-
label: 'Remove Expression'
|
|
350
|
-
});
|
|
351
|
-
export const COLLAPSE_ALL_WATCH_EXPRESSIONS = Command.toDefaultLocalizedCommand({
|
|
352
|
-
id: 'debug.watch.collapseAllExpressions',
|
|
353
|
-
category: DEBUG_CATEGORY,
|
|
354
|
-
label: 'Collapse All'
|
|
355
|
-
});
|
|
356
|
-
export const REMOVE_ALL_WATCH_EXPRESSIONS = Command.toDefaultLocalizedCommand({
|
|
357
|
-
id: 'debug.watch.removeAllExpressions',
|
|
358
|
-
category: DEBUG_CATEGORY,
|
|
359
|
-
label: 'Remove All Expressions'
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
export namespace DebugThreadContextCommands {
|
|
363
|
-
export const STEP_OVER = {
|
|
364
|
-
id: 'debug.thread.context.context.next'
|
|
365
|
-
};
|
|
366
|
-
export const STEP_INTO = {
|
|
367
|
-
id: 'debug.thread.context.stepin'
|
|
368
|
-
};
|
|
369
|
-
export const STEP_OUT = {
|
|
370
|
-
id: 'debug.thread.context.stepout'
|
|
371
|
-
};
|
|
372
|
-
export const CONTINUE = {
|
|
373
|
-
id: 'debug.thread.context.continue'
|
|
374
|
-
};
|
|
375
|
-
export const PAUSE = {
|
|
376
|
-
id: 'debug.thread.context.pause'
|
|
377
|
-
};
|
|
378
|
-
export const TERMINATE = {
|
|
379
|
-
id: 'debug.thread.context.terminate'
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
export namespace DebugSessionContextCommands {
|
|
383
|
-
export const STOP = {
|
|
384
|
-
id: 'debug.session.context.stop'
|
|
385
|
-
};
|
|
386
|
-
export const RESTART = {
|
|
387
|
-
id: 'debug.session.context.restart'
|
|
388
|
-
};
|
|
389
|
-
export const PAUSE_ALL = {
|
|
390
|
-
id: 'debug.session.context.pauseAll'
|
|
391
|
-
};
|
|
392
|
-
export const CONTINUE_ALL = {
|
|
393
|
-
id: 'debug.session.context.continueAll'
|
|
394
|
-
};
|
|
395
|
-
export const REVEAL = {
|
|
396
|
-
id: 'debug.session.context.reveal'
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
export namespace DebugEditorContextCommands {
|
|
400
|
-
export const ADD_BREAKPOINT = {
|
|
401
|
-
id: 'debug.editor.context.addBreakpoint'
|
|
402
|
-
};
|
|
403
|
-
export const ADD_CONDITIONAL_BREAKPOINT = {
|
|
404
|
-
id: 'debug.editor.context.addBreakpoint.conditional'
|
|
405
|
-
};
|
|
406
|
-
export const ADD_LOGPOINT = {
|
|
407
|
-
id: 'debug.editor.context.add.logpoint'
|
|
408
|
-
};
|
|
409
|
-
export const REMOVE_BREAKPOINT = {
|
|
410
|
-
id: 'debug.editor.context.removeBreakpoint'
|
|
411
|
-
};
|
|
412
|
-
export const EDIT_BREAKPOINT = {
|
|
413
|
-
id: 'debug.editor.context.edit.breakpoint'
|
|
414
|
-
};
|
|
415
|
-
export const ENABLE_BREAKPOINT = {
|
|
416
|
-
id: 'debug.editor.context.enableBreakpoint'
|
|
417
|
-
};
|
|
418
|
-
export const DISABLE_BREAKPOINT = {
|
|
419
|
-
id: 'debug.editor.context.disableBreakpoint'
|
|
420
|
-
};
|
|
421
|
-
export const REMOVE_LOGPOINT = {
|
|
422
|
-
id: 'debug.editor.context.logpoint.remove'
|
|
423
|
-
};
|
|
424
|
-
export const EDIT_LOGPOINT = {
|
|
425
|
-
id: 'debug.editor.context.logpoint.edit'
|
|
426
|
-
};
|
|
427
|
-
export const ENABLE_LOGPOINT = {
|
|
428
|
-
id: 'debug.editor.context.logpoint.enable'
|
|
429
|
-
};
|
|
430
|
-
export const DISABLE_LOGPOINT = {
|
|
431
|
-
id: 'debug.editor.context.logpoint.disable'
|
|
432
|
-
};
|
|
433
|
-
export const JUMP_TO_CURSOR = {
|
|
434
|
-
id: 'debug.editor.context.jumpToCursor'
|
|
435
|
-
};
|
|
436
|
-
export const RUN_TO_LINE = {
|
|
437
|
-
id: 'debug.editor.context.runToLine'
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
export namespace DebugBreakpointWidgetCommands {
|
|
441
|
-
export const ACCEPT = {
|
|
442
|
-
id: 'debug.breakpointWidget.accept'
|
|
443
|
-
};
|
|
444
|
-
export const CLOSE = {
|
|
445
|
-
id: 'debug.breakpointWidget.close'
|
|
446
|
-
};
|
|
447
|
-
}
|
|
67
|
+
import {
|
|
68
|
+
DebugMenus, DebugCommands, DebugThreadContextCommands, DebugSessionContextCommands,
|
|
69
|
+
DebugEditorContextCommands, DebugBreakpointWidgetCommands, nlsEnableBreakpoint, nlsDisableBreakpoint
|
|
70
|
+
} from './debug-commands';
|
|
448
71
|
|
|
449
72
|
@injectable()
|
|
450
73
|
export class DebugFrontendApplicationContribution extends AbstractViewContribution<DebugWidget>
|
|
@@ -577,7 +200,7 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
577
200
|
|
|
578
201
|
override registerMenus(menus: MenuModelRegistry): void {
|
|
579
202
|
super.registerMenus(menus);
|
|
580
|
-
const registerMenuActions = (menuPath: string[], ...commands: (Command & { order?: string })[]) => {
|
|
203
|
+
const registerMenuActions = (menuPath: string[], ...commands: (Command & { order?: string, when?: string })[]) => {
|
|
581
204
|
for (const [index, command] of commands.entries()) {
|
|
582
205
|
const label = command.label;
|
|
583
206
|
const debug = `${DebugCommands.DEBUG_CATEGORY}:`;
|
|
@@ -585,6 +208,7 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
585
208
|
commandId: command.id,
|
|
586
209
|
label: label && label.startsWith(debug) && label.slice(debug.length).trimStart() || label,
|
|
587
210
|
icon: command.iconClass,
|
|
211
|
+
when: command.when,
|
|
588
212
|
order: command.order || String.fromCharCode('a'.charCodeAt(0) + index)
|
|
589
213
|
});
|
|
590
214
|
}
|
|
@@ -727,6 +351,15 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
727
351
|
menus.linkCompoundMenuNode({ newParentPath: EDITOR_LINENUMBER_CONTEXT_MENU, submenuPath: DebugEditorModel.CONTEXT_MENU });
|
|
728
352
|
|
|
729
353
|
menus.registerSubmenu(DebugToolBar.MENU, nls.localize('theia/debug/debugToolbarMenu', 'Debug Toolbar Menu'));
|
|
354
|
+
registerMenuActions(DebugToolBar.CONTROLS,
|
|
355
|
+
{ ...DebugCommands.CONTINUE, when: 'debugState == stopped' },
|
|
356
|
+
{ ...DebugCommands.PAUSE, when: 'debugState != stopped' },
|
|
357
|
+
DebugCommands.STEP_OVER,
|
|
358
|
+
DebugCommands.STEP_INTO,
|
|
359
|
+
DebugCommands.STEP_OUT,
|
|
360
|
+
DebugCommands.RESTART,
|
|
361
|
+
DebugCommands.STOP
|
|
362
|
+
);
|
|
730
363
|
}
|
|
731
364
|
|
|
732
365
|
override registerCommands(registry: CommandRegistry): void {
|
|
@@ -895,15 +528,17 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
895
528
|
});
|
|
896
529
|
registry.registerCommand(DebugCommands.EDIT_BREAKPOINT, {
|
|
897
530
|
execute: async () => {
|
|
898
|
-
const { selectedBreakpoint, selectedFunctionBreakpoint } = this;
|
|
531
|
+
const { selectedBreakpoint, selectedFunctionBreakpoint, selectedLogpoint } = this;
|
|
899
532
|
if (selectedBreakpoint) {
|
|
900
533
|
await this.editors.editBreakpoint(selectedBreakpoint);
|
|
901
534
|
} else if (selectedFunctionBreakpoint) {
|
|
902
535
|
await selectedFunctionBreakpoint.open();
|
|
536
|
+
} else if (selectedLogpoint) {
|
|
537
|
+
await this.editors.editBreakpoint(selectedLogpoint);
|
|
903
538
|
}
|
|
904
539
|
},
|
|
905
|
-
isEnabled: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint),
|
|
906
|
-
isVisible: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint)
|
|
540
|
+
isEnabled: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint || !!this.selectedLogpoint),
|
|
541
|
+
isVisible: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint || !!this.selectedLogpoint)
|
|
907
542
|
});
|
|
908
543
|
registry.registerCommand(DebugCommands.EDIT_LOGPOINT, {
|
|
909
544
|
execute: async () => {
|
|
@@ -922,8 +557,8 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
922
557
|
await selectedExceptionBreakpoint.editCondition();
|
|
923
558
|
}
|
|
924
559
|
},
|
|
925
|
-
isEnabled: () =>
|
|
926
|
-
isVisible: () =>
|
|
560
|
+
isEnabled: () => !!this.selectedExceptionBreakpoint?.data.raw.supportsCondition,
|
|
561
|
+
isVisible: () => !!this.selectedExceptionBreakpoint?.data.raw.supportsCondition
|
|
927
562
|
});
|
|
928
563
|
registry.registerCommand(DebugCommands.REMOVE_BREAKPOINT, {
|
|
929
564
|
execute: () => {
|
|
@@ -1303,23 +938,6 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
1303
938
|
}
|
|
1304
939
|
|
|
1305
940
|
registerToolbarItems(toolbar: TabBarToolbarRegistry): void {
|
|
1306
|
-
const onDidChangeToggleBreakpointsEnabled = new Emitter<void>();
|
|
1307
|
-
const toggleBreakpointsEnabled: Mutable<RenderedToolbarAction> = {
|
|
1308
|
-
id: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
1309
|
-
command: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
1310
|
-
icon: codicon('activate-breakpoints'),
|
|
1311
|
-
onDidChange: onDidChangeToggleBreakpointsEnabled.event,
|
|
1312
|
-
priority: 1
|
|
1313
|
-
};
|
|
1314
|
-
const updateToggleBreakpointsEnabled = () => {
|
|
1315
|
-
const activateBreakpoints = nls.localizeByDefault('Enable All Breakpoints');
|
|
1316
|
-
const deactivateBreakpoints = nls.localizeByDefault('Disable All Breakpoints');
|
|
1317
|
-
const tooltip = this.breakpointManager.breakpointsEnabled ? deactivateBreakpoints : activateBreakpoints;
|
|
1318
|
-
if (toggleBreakpointsEnabled.tooltip !== tooltip) {
|
|
1319
|
-
toggleBreakpointsEnabled.tooltip = tooltip;
|
|
1320
|
-
onDidChangeToggleBreakpointsEnabled.fire(undefined);
|
|
1321
|
-
}
|
|
1322
|
-
};
|
|
1323
941
|
toolbar.registerItem({
|
|
1324
942
|
id: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
|
|
1325
943
|
command: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
|
|
@@ -1333,9 +951,12 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
1333
951
|
tooltip: DebugCommands.ADD_DATA_BREAKPOINT.label,
|
|
1334
952
|
onDidChange: this.manager.onDidStopDebugSession as unknown as Event<void>
|
|
1335
953
|
});
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
954
|
+
toolbar.registerItem({
|
|
955
|
+
id: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
956
|
+
command: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
957
|
+
icon: codicon('activate-breakpoints'),
|
|
958
|
+
priority: 1
|
|
959
|
+
});
|
|
1339
960
|
toolbar.registerItem({
|
|
1340
961
|
id: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
|
|
1341
962
|
command: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
|
|
@@ -1376,7 +997,11 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
1376
997
|
...options
|
|
1377
998
|
};
|
|
1378
999
|
const debugWidget = await this.openView({ reveal });
|
|
1379
|
-
|
|
1000
|
+
// Only switch to this session if it has a stopped thread
|
|
1001
|
+
// Don't switch to background sessions that are just starting up
|
|
1002
|
+
if (session.currentThread && session.currentThread.stopped) {
|
|
1003
|
+
debugWidget.sessionManager.currentSession = session;
|
|
1004
|
+
}
|
|
1380
1005
|
return debugWidget['sessionWidget'];
|
|
1381
1006
|
}
|
|
1382
1007
|
|
|
@@ -18,7 +18,7 @@ import { inject, injectable, optional, postConstruct } from '@theia/core/shared/
|
|
|
18
18
|
import { Command, CommandContribution, CommandHandler, CommandRegistry } from '@theia/core/lib/common/command';
|
|
19
19
|
import { DebugSessionManager } from './debug-session-manager';
|
|
20
20
|
import { DebugConfigurationManager } from './debug-configuration-manager';
|
|
21
|
-
import { DebugCommands } from './debug-
|
|
21
|
+
import { DebugCommands } from './debug-commands';
|
|
22
22
|
import { DebugSessionOptions } from './debug-session-options';
|
|
23
23
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
24
24
|
import { LabelProvider } from '@theia/core/lib/browser/label-provider';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify';
|
|
18
|
-
import { MessageClient } from '@theia/core/lib/common';
|
|
18
|
+
import { CommandService, MessageClient } from '@theia/core/lib/common';
|
|
19
19
|
import { LabelProvider } from '@theia/core/lib/browser';
|
|
20
20
|
import { EditorManager } from '@theia/editor/lib/browser';
|
|
21
21
|
import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
|
|
@@ -121,6 +121,8 @@ export class DefaultDebugSessionFactory implements DebugSessionFactory {
|
|
|
121
121
|
protected readonly testService: TestService;
|
|
122
122
|
@inject(WorkspaceService)
|
|
123
123
|
protected readonly workspaceService: WorkspaceService;
|
|
124
|
+
@inject(CommandService)
|
|
125
|
+
protected commandService: CommandService;
|
|
124
126
|
|
|
125
127
|
get(manager: DebugSessionManager, sessionId: string, options: DebugConfigurationSessionOptions, parentSession?: DebugSession): DebugSession {
|
|
126
128
|
const connection = new DebugSessionConnection(
|
|
@@ -147,7 +149,8 @@ export class DefaultDebugSessionFactory implements DebugSessionFactory {
|
|
|
147
149
|
this.fileService,
|
|
148
150
|
this.debugContributionProvider,
|
|
149
151
|
this.workspaceService,
|
|
150
|
-
this.debugPreferences
|
|
152
|
+
this.debugPreferences,
|
|
153
|
+
this.commandService
|
|
151
154
|
);
|
|
152
155
|
}
|
|
153
156
|
|