@codingame/monaco-vscode-debug-service-override 4.5.2 → 5.0.1

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 (27) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +42 -34
  3. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +93 -93
  4. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +7 -5
  5. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +1 -1
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +12 -9
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +1 -1
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +6 -3
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +1 -1
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +3 -3
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +16 -12
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +12 -5
  15. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +6 -6
  16. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +1 -1
  18. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +20 -16
  19. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +4 -1
  20. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +22 -16
  21. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +33 -21
  22. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +12 -11
  23. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +6 -4
  24. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +1 -0
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -963
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -103
  27. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -84
@@ -1,963 +0,0 @@
1
- import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
2
- import { List } from 'vscode/vscode/vs/base/browser/ui/list/listWidget';
3
- import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
4
- import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService.service';
5
- import { REPL_VIEW_ID, CONTEXT_DISASSEMBLY_VIEW_FOCUS, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_IN_DEBUG_REPL, CONTEXT_IN_DEBUG_MODE, CONTEXT_DEBUG_STATE, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_DEBUGGERS_AVAILABLE, getStateLabel, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED, CONTEXT_EXPRESSION_SELECTED, CONTEXT_BREAKPOINT_INPUT_FOCUSED, EDITOR_CONTRIBUTION_ID, VIEWLET_ID as VIEWLET_ID$1 } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
6
- import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
7
- import { Expression, Variable, Breakpoint, FunctionBreakpoint, DataBreakpoint } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
8
- import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions';
9
- import { isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
10
- import { MenuRegistry, MenuId, registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
11
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
12
- import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
13
- import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
14
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
15
- import { openBreakpointSource } from 'vscode/vscode/vs/workbench/contrib/debug/browser/breakpointsView';
16
- import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
17
- import { InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
18
- import { ResourceContextKey, ActiveEditorContext, PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
19
- import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
20
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
21
- import { ITextResourcePropertiesService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
22
- import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
23
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
24
- import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
25
- import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
26
- import { deepClone } from 'vscode/vscode/vs/base/common/objects';
27
- import { isWeb, isWindows } from 'vscode/vscode/vs/base/common/platform';
28
- import { saveAllBeforeDebugStart } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
29
- import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
30
- import { showLoadedScriptMenu } from '../common/loadedScriptsPicker.js';
31
- import { showDebugSessionMenu } from './debugSessionPicker.js';
32
- import { TEXT_FILE_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
33
-
34
- const _moduleId = "vs/workbench/contrib/debug/browser/debugCommands";
35
- const ADD_CONFIGURATION_ID = 'debug.addConfiguration';
36
- const TOGGLE_INLINE_BREAKPOINT_ID = 'editor.debug.action.toggleInlineBreakpoint';
37
- const COPY_STACK_TRACE_ID = 'debug.copyStackTrace';
38
- const REVERSE_CONTINUE_ID = 'workbench.action.debug.reverseContinue';
39
- const STEP_BACK_ID = 'workbench.action.debug.stepBack';
40
- const RESTART_SESSION_ID = 'workbench.action.debug.restart';
41
- const TERMINATE_THREAD_ID = 'workbench.action.debug.terminateThread';
42
- const STEP_OVER_ID = 'workbench.action.debug.stepOver';
43
- const STEP_INTO_ID = 'workbench.action.debug.stepInto';
44
- const STEP_INTO_TARGET_ID = 'workbench.action.debug.stepIntoTarget';
45
- const STEP_OUT_ID = 'workbench.action.debug.stepOut';
46
- const PAUSE_ID = 'workbench.action.debug.pause';
47
- const DISCONNECT_ID = 'workbench.action.debug.disconnect';
48
- const DISCONNECT_AND_SUSPEND_ID = 'workbench.action.debug.disconnectAndSuspend';
49
- const STOP_ID = 'workbench.action.debug.stop';
50
- const RESTART_FRAME_ID = 'workbench.action.debug.restartFrame';
51
- const CONTINUE_ID = 'workbench.action.debug.continue';
52
- const FOCUS_REPL_ID = 'workbench.debug.action.focusRepl';
53
- const JUMP_TO_CURSOR_ID = 'debug.jumpToCursor';
54
- const FOCUS_SESSION_ID = 'workbench.action.debug.focusProcess';
55
- const SELECT_AND_START_ID = 'workbench.action.debug.selectandstart';
56
- const SELECT_DEBUG_CONSOLE_ID = 'workbench.action.debug.selectDebugConsole';
57
- const SELECT_DEBUG_SESSION_ID = 'workbench.action.debug.selectDebugSession';
58
- const DEBUG_CONFIGURE_COMMAND_ID = 'workbench.action.debug.configure';
59
- const DEBUG_START_COMMAND_ID = 'workbench.action.debug.start';
60
- const DEBUG_RUN_COMMAND_ID = 'workbench.action.debug.run';
61
- const EDIT_EXPRESSION_COMMAND_ID = 'debug.renameWatchExpression';
62
- const SET_EXPRESSION_COMMAND_ID = 'debug.setWatchExpression';
63
- const REMOVE_EXPRESSION_COMMAND_ID = 'debug.removeWatchExpression';
64
- const NEXT_DEBUG_CONSOLE_ID = 'workbench.action.debug.nextConsole';
65
- const PREV_DEBUG_CONSOLE_ID = 'workbench.action.debug.prevConsole';
66
- const SHOW_LOADED_SCRIPTS_ID = 'workbench.action.debug.showLoadedScripts';
67
- const CALLSTACK_TOP_ID = 'workbench.action.debug.callStackTop';
68
- const CALLSTACK_BOTTOM_ID = 'workbench.action.debug.callStackBottom';
69
- const CALLSTACK_UP_ID = 'workbench.action.debug.callStackUp';
70
- const CALLSTACK_DOWN_ID = 'workbench.action.debug.callStackDown';
71
- const DEBUG_COMMAND_CATEGORY = ( localize2WithPath(_moduleId, 0, 'Debug'));
72
- const RESTART_LABEL = ( localize2WithPath(_moduleId, 1, "Restart"));
73
- const STEP_OVER_LABEL = ( localize2WithPath(_moduleId, 2, "Step Over"));
74
- const STEP_INTO_LABEL = ( localize2WithPath(_moduleId, 3, "Step Into"));
75
- const STEP_INTO_TARGET_LABEL = ( localize2WithPath(_moduleId, 4, "Step Into Target"));
76
- const STEP_OUT_LABEL = ( localize2WithPath(_moduleId, 5, "Step Out"));
77
- const PAUSE_LABEL = ( localize2WithPath(_moduleId, 6, "Pause"));
78
- const DISCONNECT_LABEL = ( localize2WithPath(_moduleId, 7, "Disconnect"));
79
- const DISCONNECT_AND_SUSPEND_LABEL = ( localize2WithPath(_moduleId, 8, "Disconnect and Suspend"));
80
- const STOP_LABEL = ( localize2WithPath(_moduleId, 9, "Stop"));
81
- const CONTINUE_LABEL = ( localize2WithPath(_moduleId, 10, "Continue"));
82
- const FOCUS_SESSION_LABEL = ( localize2WithPath(_moduleId, 11, "Focus Session"));
83
- const SELECT_AND_START_LABEL = ( localize2WithPath(_moduleId, 12, "Select and Start Debugging"));
84
- const DEBUG_CONFIGURE_LABEL = ( localizeWithPath(_moduleId, 13, "Open '{0}'", 'launch.json'));
85
- const DEBUG_START_LABEL = ( localize2WithPath(_moduleId, 14, "Start Debugging"));
86
- const DEBUG_RUN_LABEL = ( localize2WithPath(_moduleId, 15, "Start Without Debugging"));
87
- const NEXT_DEBUG_CONSOLE_LABEL = ( localize2WithPath(_moduleId, 16, "Focus Next Debug Console"));
88
- const PREV_DEBUG_CONSOLE_LABEL = ( localize2WithPath(_moduleId, 17, "Focus Previous Debug Console"));
89
- const OPEN_LOADED_SCRIPTS_LABEL = ( localize2WithPath(_moduleId, 18, "Open Loaded Script..."));
90
- const CALLSTACK_TOP_LABEL = ( localize2WithPath(_moduleId, 19, "Navigate to Top of Call Stack"));
91
- const CALLSTACK_BOTTOM_LABEL = ( localize2WithPath(_moduleId, 20, "Navigate to Bottom of Call Stack"));
92
- const CALLSTACK_UP_LABEL = ( localize2WithPath(_moduleId, 21, "Navigate Up Call Stack"));
93
- const CALLSTACK_DOWN_LABEL = ( localize2WithPath(_moduleId, 22, "Navigate Down Call Stack"));
94
- const SELECT_DEBUG_CONSOLE_LABEL = ( localize2WithPath(_moduleId, 23, "Select Debug Console"));
95
- const SELECT_DEBUG_SESSION_LABEL = ( localize2WithPath(_moduleId, 24, "Select Debug Session"));
96
- const DEBUG_QUICK_ACCESS_PREFIX = 'debug ';
97
- const DEBUG_CONSOLE_QUICK_ACCESS_PREFIX = 'debug consoles ';
98
- function isThreadContext(obj) {
99
- return obj && typeof obj.sessionId === 'string' && typeof obj.threadId === 'string';
100
- }
101
- async function getThreadAndRun(accessor, sessionAndThreadId, run) {
102
- const debugService = accessor.get(IDebugService);
103
- let thread;
104
- if (isThreadContext(sessionAndThreadId)) {
105
- const session = debugService.getModel().getSession(sessionAndThreadId.sessionId);
106
- if (session) {
107
- thread = session.getAllThreads().find(t => t.getId() === sessionAndThreadId.threadId);
108
- }
109
- }
110
- else if (isSessionContext(sessionAndThreadId)) {
111
- const session = debugService.getModel().getSession(sessionAndThreadId.sessionId);
112
- if (session) {
113
- const threads = session.getAllThreads();
114
- thread = threads.length > 0 ? threads[0] : undefined;
115
- }
116
- }
117
- if (!thread) {
118
- thread = debugService.getViewModel().focusedThread;
119
- if (!thread) {
120
- const focusedSession = debugService.getViewModel().focusedSession;
121
- const threads = focusedSession ? focusedSession.getAllThreads() : undefined;
122
- thread = threads && threads.length ? threads[0] : undefined;
123
- }
124
- }
125
- if (thread) {
126
- await run(thread);
127
- }
128
- }
129
- function isStackFrameContext(obj) {
130
- return obj && typeof obj.sessionId === 'string' && typeof obj.threadId === 'string' && typeof obj.frameId === 'string';
131
- }
132
- function getFrame(debugService, context) {
133
- if (isStackFrameContext(context)) {
134
- const session = debugService.getModel().getSession(context.sessionId);
135
- if (session) {
136
- const thread = session.getAllThreads().find(t => t.getId() === context.threadId);
137
- if (thread) {
138
- return thread.getCallStack().find(sf => sf.getId() === context.frameId);
139
- }
140
- }
141
- }
142
- else {
143
- return debugService.getViewModel().focusedStackFrame;
144
- }
145
- return undefined;
146
- }
147
- function isSessionContext(obj) {
148
- return obj && typeof obj.sessionId === 'string';
149
- }
150
- async function changeDebugConsoleFocus(accessor, next) {
151
- const debugService = accessor.get(IDebugService);
152
- const viewsService = accessor.get(IViewsService);
153
- const sessions = debugService.getModel().getSessions(true).filter(s => s.hasSeparateRepl());
154
- let currSession = debugService.getViewModel().focusedSession;
155
- let nextIndex = 0;
156
- if (sessions.length > 0 && currSession) {
157
- while (currSession && !currSession.hasSeparateRepl()) {
158
- currSession = currSession.parentSession;
159
- }
160
- if (currSession) {
161
- const currIndex = sessions.indexOf(currSession);
162
- if (next) {
163
- nextIndex = (currIndex === (sessions.length - 1) ? 0 : (currIndex + 1));
164
- }
165
- else {
166
- nextIndex = (currIndex === 0 ? (sessions.length - 1) : (currIndex - 1));
167
- }
168
- }
169
- }
170
- await debugService.focusStackFrame(undefined, undefined, sessions[nextIndex], { explicit: true });
171
- if (!viewsService.isViewVisible(REPL_VIEW_ID)) {
172
- await viewsService.openView(REPL_VIEW_ID, true);
173
- }
174
- }
175
- async function navigateCallStack(debugService, down) {
176
- const frame = debugService.getViewModel().focusedStackFrame;
177
- if (frame) {
178
- let callStack = frame.thread.getCallStack();
179
- let index = callStack.findIndex(elem => elem.frameId === frame.frameId);
180
- let nextVisibleFrame;
181
- if (down) {
182
- if (index >= callStack.length - 1) {
183
- if (frame.thread.reachedEndOfCallStack) {
184
- goToTopOfCallStack(debugService);
185
- return;
186
- }
187
- else {
188
- await debugService.getModel().fetchCallstack(frame.thread, 20);
189
- callStack = frame.thread.getCallStack();
190
- index = callStack.findIndex(elem => elem.frameId === frame.frameId);
191
- }
192
- }
193
- nextVisibleFrame = findNextVisibleFrame(true, callStack, index);
194
- }
195
- else {
196
- if (index <= 0) {
197
- goToBottomOfCallStack(debugService);
198
- return;
199
- }
200
- nextVisibleFrame = findNextVisibleFrame(false, callStack, index);
201
- }
202
- if (nextVisibleFrame) {
203
- debugService.focusStackFrame(nextVisibleFrame, undefined, undefined, { preserveFocus: false });
204
- }
205
- }
206
- }
207
- async function goToBottomOfCallStack(debugService) {
208
- const thread = debugService.getViewModel().focusedThread;
209
- if (thread) {
210
- await debugService.getModel().fetchCallstack(thread);
211
- const callStack = thread.getCallStack();
212
- if (callStack.length > 0) {
213
- const nextVisibleFrame = findNextVisibleFrame(false, callStack, 0);
214
- if (nextVisibleFrame) {
215
- debugService.focusStackFrame(nextVisibleFrame, undefined, undefined, { preserveFocus: false });
216
- }
217
- }
218
- }
219
- }
220
- function goToTopOfCallStack(debugService) {
221
- const thread = debugService.getViewModel().focusedThread;
222
- if (thread) {
223
- debugService.focusStackFrame(thread.getTopStackFrame(), undefined, undefined, { preserveFocus: false });
224
- }
225
- }
226
- function findNextVisibleFrame(down, callStack, startIndex) {
227
- if (startIndex >= callStack.length) {
228
- startIndex = callStack.length - 1;
229
- }
230
- else if (startIndex < 0) {
231
- startIndex = 0;
232
- }
233
- let index = startIndex;
234
- let currFrame;
235
- do {
236
- if (down) {
237
- if (index === callStack.length - 1) {
238
- index = 0;
239
- }
240
- else {
241
- index++;
242
- }
243
- }
244
- else {
245
- if (index === 0) {
246
- index = callStack.length - 1;
247
- }
248
- else {
249
- index--;
250
- }
251
- }
252
- currFrame = callStack[index];
253
- if (!(currFrame.source.presentationHint === 'deemphasize' || currFrame.presentationHint === 'deemphasize')) {
254
- return currFrame;
255
- }
256
- } while (index !== startIndex);
257
- return undefined;
258
- }
259
- CommandsRegistry.registerCommand({
260
- id: COPY_STACK_TRACE_ID,
261
- handler: async (accessor, _, context) => {
262
- const textResourcePropertiesService = accessor.get(ITextResourcePropertiesService);
263
- const clipboardService = accessor.get(IClipboardService);
264
- const debugService = accessor.get(IDebugService);
265
- const frame = getFrame(debugService, context);
266
- if (frame) {
267
- const eol = textResourcePropertiesService.getEOL(frame.source.uri);
268
- await clipboardService.writeText(( (frame.thread.getCallStack().map(sf => ( (sf.toString()))))).join(eol));
269
- }
270
- }
271
- });
272
- CommandsRegistry.registerCommand({
273
- id: REVERSE_CONTINUE_ID,
274
- handler: async (accessor, _, context) => {
275
- await getThreadAndRun(accessor, context, thread => thread.reverseContinue());
276
- }
277
- });
278
- CommandsRegistry.registerCommand({
279
- id: STEP_BACK_ID,
280
- handler: async (accessor, _, context) => {
281
- const contextKeyService = accessor.get(IContextKeyService);
282
- if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
283
- await getThreadAndRun(accessor, context, (thread) => thread.stepBack('instruction'));
284
- }
285
- else {
286
- await getThreadAndRun(accessor, context, (thread) => thread.stepBack());
287
- }
288
- }
289
- });
290
- CommandsRegistry.registerCommand({
291
- id: TERMINATE_THREAD_ID,
292
- handler: async (accessor, _, context) => {
293
- await getThreadAndRun(accessor, context, thread => thread.terminate());
294
- }
295
- });
296
- CommandsRegistry.registerCommand({
297
- id: JUMP_TO_CURSOR_ID,
298
- handler: async (accessor) => {
299
- const debugService = accessor.get(IDebugService);
300
- const stackFrame = debugService.getViewModel().focusedStackFrame;
301
- const editorService = accessor.get(IEditorService);
302
- const activeEditorControl = editorService.activeTextEditorControl;
303
- const notificationService = accessor.get(INotificationService);
304
- const quickInputService = accessor.get(IQuickInputService);
305
- if (stackFrame && isCodeEditor(activeEditorControl) && activeEditorControl.hasModel()) {
306
- const position = activeEditorControl.getPosition();
307
- const resource = activeEditorControl.getModel().uri;
308
- const source = stackFrame.thread.session.getSourceForUri(resource);
309
- if (source) {
310
- const response = await stackFrame.thread.session.gotoTargets(source.raw, position.lineNumber, position.column);
311
- const targets = response?.body.targets;
312
- if (targets && targets.length) {
313
- let id = targets[0].id;
314
- if (targets.length > 1) {
315
- const picks = ( (targets.map(t => ({ label: t.label, _id: t.id }))));
316
- const pick = await quickInputService.pick(picks, { placeHolder: ( localizeWithPath(_moduleId, 25, "Choose the specific location")) });
317
- if (!pick) {
318
- return;
319
- }
320
- id = pick._id;
321
- }
322
- return await stackFrame.thread.session.goto(stackFrame.thread.threadId, id).catch(e => notificationService.warn(e));
323
- }
324
- }
325
- }
326
- return notificationService.warn(( localizeWithPath(
327
- _moduleId,
328
- 26,
329
- "No executable code is associated at the current cursor position."
330
- )));
331
- }
332
- });
333
- CommandsRegistry.registerCommand({
334
- id: CALLSTACK_TOP_ID,
335
- handler: async (accessor, _, context) => {
336
- const debugService = accessor.get(IDebugService);
337
- goToTopOfCallStack(debugService);
338
- }
339
- });
340
- CommandsRegistry.registerCommand({
341
- id: CALLSTACK_BOTTOM_ID,
342
- handler: async (accessor, _, context) => {
343
- const debugService = accessor.get(IDebugService);
344
- await goToBottomOfCallStack(debugService);
345
- }
346
- });
347
- CommandsRegistry.registerCommand({
348
- id: CALLSTACK_UP_ID,
349
- handler: async (accessor, _, context) => {
350
- const debugService = accessor.get(IDebugService);
351
- navigateCallStack(debugService, false);
352
- }
353
- });
354
- CommandsRegistry.registerCommand({
355
- id: CALLSTACK_DOWN_ID,
356
- handler: async (accessor, _, context) => {
357
- const debugService = accessor.get(IDebugService);
358
- navigateCallStack(debugService, true);
359
- }
360
- });
361
- MenuRegistry.appendMenuItem(MenuId.EditorContext, {
362
- command: {
363
- id: JUMP_TO_CURSOR_ID,
364
- title: ( localizeWithPath(_moduleId, 27, "Jump to Cursor")),
365
- category: DEBUG_COMMAND_CATEGORY
366
- },
367
- when: ( (ContextKeyExpr.and(CONTEXT_JUMP_TO_CURSOR_SUPPORTED, EditorContextKeys.editorTextFocus))),
368
- group: 'debug',
369
- order: 3
370
- });
371
- KeybindingsRegistry.registerCommandAndKeybindingRule({
372
- id: NEXT_DEBUG_CONSOLE_ID,
373
- weight: 200 + 1,
374
- when: CONTEXT_IN_DEBUG_REPL,
375
- primary: 2048 | 12 ,
376
- mac: { primary: 1024 | 2048 | 94 },
377
- handler: async (accessor, _, context) => {
378
- changeDebugConsoleFocus(accessor, true);
379
- }
380
- });
381
- KeybindingsRegistry.registerCommandAndKeybindingRule({
382
- id: PREV_DEBUG_CONSOLE_ID,
383
- weight: 200 + 1,
384
- when: CONTEXT_IN_DEBUG_REPL,
385
- primary: 2048 | 11 ,
386
- mac: { primary: 1024 | 2048 | 92 },
387
- handler: async (accessor, _, context) => {
388
- changeDebugConsoleFocus(accessor, false);
389
- }
390
- });
391
- KeybindingsRegistry.registerCommandAndKeybindingRule({
392
- id: RESTART_SESSION_ID,
393
- weight: 200 ,
394
- primary: 1024 | 2048 | 63 ,
395
- when: CONTEXT_IN_DEBUG_MODE,
396
- handler: async (accessor, _, context) => {
397
- const debugService = accessor.get(IDebugService);
398
- const configurationService = accessor.get(IConfigurationService);
399
- let session;
400
- if (isSessionContext(context)) {
401
- session = debugService.getModel().getSession(context.sessionId);
402
- }
403
- else {
404
- session = debugService.getViewModel().focusedSession;
405
- }
406
- if (!session) {
407
- const { launch, name } = debugService.getConfigurationManager().selectedConfiguration;
408
- await debugService.startDebugging(launch, name, { noDebug: false, startedByUser: true });
409
- }
410
- else {
411
- const showSubSessions = configurationService.getValue('debug').showSubSessionsInToolBar;
412
- while (!showSubSessions && session.lifecycleManagedByParent && session.parentSession) {
413
- session = session.parentSession;
414
- }
415
- session.removeReplExpressions();
416
- await debugService.restartSession(session);
417
- }
418
- }
419
- });
420
- KeybindingsRegistry.registerCommandAndKeybindingRule({
421
- id: STEP_OVER_ID,
422
- weight: 200 ,
423
- primary: 68 ,
424
- when: ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))),
425
- handler: async (accessor, _, context) => {
426
- const contextKeyService = accessor.get(IContextKeyService);
427
- if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
428
- await getThreadAndRun(accessor, context, (thread) => thread.next('instruction'));
429
- }
430
- else {
431
- await getThreadAndRun(accessor, context, (thread) => thread.next());
432
- }
433
- }
434
- });
435
- const STEP_INTO_KEYBINDING = (isWeb && isWindows) ? ((512 | 69) ) : 69 ;
436
- KeybindingsRegistry.registerCommandAndKeybindingRule({
437
- id: STEP_INTO_ID,
438
- weight: 200 + 10,
439
- primary: STEP_INTO_KEYBINDING,
440
- when: ( (CONTEXT_DEBUG_STATE.notEqualsTo('inactive'))),
441
- handler: async (accessor, _, context) => {
442
- const contextKeyService = accessor.get(IContextKeyService);
443
- if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
444
- await getThreadAndRun(accessor, context, (thread) => thread.stepIn('instruction'));
445
- }
446
- else {
447
- await getThreadAndRun(accessor, context, (thread) => thread.stepIn());
448
- }
449
- }
450
- });
451
- KeybindingsRegistry.registerCommandAndKeybindingRule({
452
- id: STEP_OUT_ID,
453
- weight: 200 ,
454
- primary: 1024 | 69 ,
455
- when: ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))),
456
- handler: async (accessor, _, context) => {
457
- const contextKeyService = accessor.get(IContextKeyService);
458
- if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
459
- await getThreadAndRun(accessor, context, (thread) => thread.stepOut('instruction'));
460
- }
461
- else {
462
- await getThreadAndRun(accessor, context, (thread) => thread.stepOut());
463
- }
464
- }
465
- });
466
- KeybindingsRegistry.registerCommandAndKeybindingRule({
467
- id: PAUSE_ID,
468
- weight: 200 + 2,
469
- primary: 64 ,
470
- when: ( (CONTEXT_DEBUG_STATE.isEqualTo('running'))),
471
- handler: async (accessor, _, context) => {
472
- await getThreadAndRun(accessor, context, thread => thread.pause());
473
- }
474
- });
475
- KeybindingsRegistry.registerCommandAndKeybindingRule({
476
- id: STEP_INTO_TARGET_ID,
477
- primary: STEP_INTO_KEYBINDING | 2048 ,
478
- when: ( (ContextKeyExpr.and(
479
- CONTEXT_STEP_INTO_TARGETS_SUPPORTED,
480
- CONTEXT_IN_DEBUG_MODE,
481
- (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))
482
- ))),
483
- weight: 200 ,
484
- handler: async (accessor, _, context) => {
485
- const quickInputService = accessor.get(IQuickInputService);
486
- const debugService = accessor.get(IDebugService);
487
- const session = debugService.getViewModel().focusedSession;
488
- const frame = debugService.getViewModel().focusedStackFrame;
489
- if (!frame || !session) {
490
- return;
491
- }
492
- const editor = await accessor.get(IEditorService).openEditor({
493
- resource: frame.source.uri,
494
- options: { revealIfOpened: true }
495
- });
496
- let codeEditor;
497
- if (editor) {
498
- const ctrl = editor?.getControl();
499
- if (isCodeEditor(ctrl)) {
500
- codeEditor = ctrl;
501
- }
502
- }
503
- const qp = quickInputService.createQuickPick();
504
- qp.busy = true;
505
- qp.show();
506
- qp.onDidChangeActive(([item]) => {
507
- if (codeEditor && item && item.target.line !== undefined) {
508
- codeEditor.revealLineInCenterIfOutsideViewport(item.target.line);
509
- codeEditor.setSelection({
510
- startLineNumber: item.target.line,
511
- startColumn: item.target.column || 1,
512
- endLineNumber: item.target.endLine || item.target.line,
513
- endColumn: item.target.endColumn || item.target.column || 1,
514
- });
515
- }
516
- });
517
- qp.onDidAccept(() => {
518
- if (qp.activeItems.length) {
519
- session.stepIn(frame.thread.threadId, qp.activeItems[0].target.id);
520
- }
521
- });
522
- qp.onDidHide(() => qp.dispose());
523
- session.stepInTargets(frame.frameId).then(targets => {
524
- qp.busy = false;
525
- if (targets?.length) {
526
- qp.items = targets?.map(target => ({ target, label: target.label }));
527
- }
528
- else {
529
- qp.placeholder = ( localizeWithPath(_moduleId, 28, "No step targets available"));
530
- }
531
- });
532
- }
533
- });
534
- async function stopHandler(accessor, _, context, disconnect, suspend) {
535
- const debugService = accessor.get(IDebugService);
536
- let session;
537
- if (isSessionContext(context)) {
538
- session = debugService.getModel().getSession(context.sessionId);
539
- }
540
- else {
541
- session = debugService.getViewModel().focusedSession;
542
- }
543
- const configurationService = accessor.get(IConfigurationService);
544
- const showSubSessions = configurationService.getValue('debug').showSubSessionsInToolBar;
545
- while (!showSubSessions && session && session.lifecycleManagedByParent && session.parentSession) {
546
- session = session.parentSession;
547
- }
548
- await debugService.stopSession(session, disconnect, suspend);
549
- }
550
- KeybindingsRegistry.registerCommandAndKeybindingRule({
551
- id: DISCONNECT_ID,
552
- weight: 200 ,
553
- primary: 1024 | 63 ,
554
- when: ( (ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_IN_DEBUG_MODE))),
555
- handler: (accessor, _, context) => stopHandler(accessor, _, context, true)
556
- });
557
- CommandsRegistry.registerCommand({
558
- id: DISCONNECT_AND_SUSPEND_ID,
559
- handler: (accessor, _, context) => stopHandler(accessor, _, context, true, true)
560
- });
561
- KeybindingsRegistry.registerCommandAndKeybindingRule({
562
- id: STOP_ID,
563
- weight: 200 ,
564
- primary: 1024 | 63 ,
565
- when: ( (ContextKeyExpr.and(
566
- (CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()),
567
- CONTEXT_IN_DEBUG_MODE
568
- ))),
569
- handler: (accessor, _, context) => stopHandler(accessor, _, context, false)
570
- });
571
- CommandsRegistry.registerCommand({
572
- id: RESTART_FRAME_ID,
573
- handler: async (accessor, _, context) => {
574
- const debugService = accessor.get(IDebugService);
575
- const notificationService = accessor.get(INotificationService);
576
- const frame = getFrame(debugService, context);
577
- if (frame) {
578
- try {
579
- await frame.restart();
580
- }
581
- catch (e) {
582
- notificationService.error(e);
583
- }
584
- }
585
- }
586
- });
587
- KeybindingsRegistry.registerCommandAndKeybindingRule({
588
- id: CONTINUE_ID,
589
- weight: 200 + 10,
590
- primary: 63 ,
591
- when: ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))),
592
- handler: async (accessor, _, context) => {
593
- await getThreadAndRun(accessor, context, thread => thread.continue());
594
- }
595
- });
596
- CommandsRegistry.registerCommand({
597
- id: SHOW_LOADED_SCRIPTS_ID,
598
- handler: async (accessor) => {
599
- await showLoadedScriptMenu(accessor);
600
- }
601
- });
602
- CommandsRegistry.registerCommand({
603
- id: FOCUS_REPL_ID,
604
- handler: async (accessor) => {
605
- const viewsService = accessor.get(IViewsService);
606
- await viewsService.openView(REPL_VIEW_ID, true);
607
- }
608
- });
609
- CommandsRegistry.registerCommand({
610
- id: 'debug.startFromConfig',
611
- handler: async (accessor, config) => {
612
- const debugService = accessor.get(IDebugService);
613
- await debugService.startDebugging(undefined, config);
614
- }
615
- });
616
- CommandsRegistry.registerCommand({
617
- id: FOCUS_SESSION_ID,
618
- handler: async (accessor, session) => {
619
- const debugService = accessor.get(IDebugService);
620
- const editorService = accessor.get(IEditorService);
621
- const stoppedChildSession = debugService.getModel().getSessions().find(s => s.parentSession === session && s.state === 2 );
622
- if (stoppedChildSession && session.state !== 2 ) {
623
- session = stoppedChildSession;
624
- }
625
- await debugService.focusStackFrame(undefined, undefined, session, { explicit: true });
626
- const stackFrame = debugService.getViewModel().focusedStackFrame;
627
- if (stackFrame) {
628
- await stackFrame.openInEditor(editorService, true);
629
- }
630
- }
631
- });
632
- CommandsRegistry.registerCommand({
633
- id: SELECT_AND_START_ID,
634
- handler: async (accessor, debugType) => {
635
- const quickInputService = accessor.get(IQuickInputService);
636
- const debugService = accessor.get(IDebugService);
637
- if (debugType) {
638
- const configManager = debugService.getConfigurationManager();
639
- const dynamicProviders = await configManager.getDynamicProviders();
640
- for (const provider of dynamicProviders) {
641
- if (provider.type === debugType) {
642
- const pick = await provider.pick();
643
- if (pick) {
644
- await configManager.selectConfiguration(pick.launch, pick.config.name, pick.config, { type: provider.type });
645
- debugService.startDebugging(pick.launch, pick.config, { startedByUser: true });
646
- return;
647
- }
648
- }
649
- }
650
- }
651
- quickInputService.quickAccess.show(DEBUG_QUICK_ACCESS_PREFIX);
652
- }
653
- });
654
- CommandsRegistry.registerCommand({
655
- id: SELECT_DEBUG_CONSOLE_ID,
656
- handler: async (accessor) => {
657
- const quickInputService = accessor.get(IQuickInputService);
658
- quickInputService.quickAccess.show(DEBUG_CONSOLE_QUICK_ACCESS_PREFIX);
659
- }
660
- });
661
- CommandsRegistry.registerCommand({
662
- id: SELECT_DEBUG_SESSION_ID,
663
- handler: async (accessor) => {
664
- showDebugSessionMenu(accessor, SELECT_AND_START_ID);
665
- }
666
- });
667
- KeybindingsRegistry.registerCommandAndKeybindingRule({
668
- id: DEBUG_START_COMMAND_ID,
669
- weight: 200 ,
670
- primary: 63 ,
671
- when: ( (ContextKeyExpr.and(
672
- CONTEXT_DEBUGGERS_AVAILABLE,
673
- (CONTEXT_DEBUG_STATE.isEqualTo('inactive'))
674
- ))),
675
- handler: async (accessor, debugStartOptions) => {
676
- const debugService = accessor.get(IDebugService);
677
- await saveAllBeforeDebugStart(accessor.get(IConfigurationService), accessor.get(IEditorService));
678
- const { launch, name, getConfig } = debugService.getConfigurationManager().selectedConfiguration;
679
- const config = await getConfig();
680
- const configOrName = config ? Object.assign(deepClone(config), debugStartOptions?.config) : name;
681
- await debugService.startDebugging(launch, configOrName, { noDebug: debugStartOptions?.noDebug, startedByUser: true }, false);
682
- }
683
- });
684
- KeybindingsRegistry.registerCommandAndKeybindingRule({
685
- id: DEBUG_RUN_COMMAND_ID,
686
- weight: 200 ,
687
- primary: 2048 | 63 ,
688
- mac: { primary: 256 | 63 },
689
- when: ( (ContextKeyExpr.and(
690
- CONTEXT_DEBUGGERS_AVAILABLE,
691
- (CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 )))
692
- ))),
693
- handler: async (accessor) => {
694
- const commandService = accessor.get(ICommandService);
695
- await commandService.executeCommand(DEBUG_START_COMMAND_ID, { noDebug: true });
696
- }
697
- });
698
- KeybindingsRegistry.registerCommandAndKeybindingRule({
699
- id: 'debug.toggleBreakpoint',
700
- weight: 200 + 5,
701
- when: ( (ContextKeyExpr.and(
702
- CONTEXT_BREAKPOINTS_FOCUSED,
703
- (InputFocusedContext.toNegated())
704
- ))),
705
- primary: 10 ,
706
- handler: (accessor) => {
707
- const listService = accessor.get(IListService);
708
- const debugService = accessor.get(IDebugService);
709
- const list = listService.lastFocusedList;
710
- if (list instanceof List) {
711
- const focused = list.getFocusedElements();
712
- if (focused && focused.length) {
713
- debugService.enableOrDisableBreakpoints(!focused[0].enabled, focused[0]);
714
- }
715
- }
716
- }
717
- });
718
- KeybindingsRegistry.registerCommandAndKeybindingRule({
719
- id: 'debug.enableOrDisableBreakpoint',
720
- weight: 200 ,
721
- primary: undefined,
722
- when: EditorContextKeys.editorTextFocus,
723
- handler: (accessor) => {
724
- const debugService = accessor.get(IDebugService);
725
- const editorService = accessor.get(IEditorService);
726
- const control = editorService.activeTextEditorControl;
727
- if (isCodeEditor(control)) {
728
- const model = control.getModel();
729
- if (model) {
730
- const position = control.getPosition();
731
- if (position) {
732
- const bps = debugService.getModel().getBreakpoints({ uri: model.uri, lineNumber: position.lineNumber });
733
- if (bps.length) {
734
- debugService.enableOrDisableBreakpoints(!bps[0].enabled, bps[0]);
735
- }
736
- }
737
- }
738
- }
739
- }
740
- });
741
- KeybindingsRegistry.registerCommandAndKeybindingRule({
742
- id: EDIT_EXPRESSION_COMMAND_ID,
743
- weight: 200 + 5,
744
- when: CONTEXT_WATCH_EXPRESSIONS_FOCUSED,
745
- primary: 60 ,
746
- mac: { primary: 3 },
747
- handler: (accessor, expression) => {
748
- const debugService = accessor.get(IDebugService);
749
- if (!(expression instanceof Expression)) {
750
- const listService = accessor.get(IListService);
751
- const focused = listService.lastFocusedList;
752
- if (focused) {
753
- const elements = focused.getFocus();
754
- if (Array.isArray(elements) && elements[0] instanceof Expression) {
755
- expression = elements[0];
756
- }
757
- }
758
- }
759
- if (expression instanceof Expression) {
760
- debugService.getViewModel().setSelectedExpression(expression, false);
761
- }
762
- }
763
- });
764
- CommandsRegistry.registerCommand({
765
- id: SET_EXPRESSION_COMMAND_ID,
766
- handler: async (accessor, expression) => {
767
- const debugService = accessor.get(IDebugService);
768
- if (expression instanceof Expression || expression instanceof Variable) {
769
- debugService.getViewModel().setSelectedExpression(expression, true);
770
- }
771
- }
772
- });
773
- KeybindingsRegistry.registerCommandAndKeybindingRule({
774
- id: 'debug.setVariable',
775
- weight: 200 + 5,
776
- when: CONTEXT_VARIABLES_FOCUSED,
777
- primary: 60 ,
778
- mac: { primary: 3 },
779
- handler: (accessor) => {
780
- const listService = accessor.get(IListService);
781
- const debugService = accessor.get(IDebugService);
782
- const focused = listService.lastFocusedList;
783
- if (focused) {
784
- const elements = focused.getFocus();
785
- if (Array.isArray(elements) && elements[0] instanceof Variable) {
786
- debugService.getViewModel().setSelectedExpression(elements[0], false);
787
- }
788
- }
789
- }
790
- });
791
- KeybindingsRegistry.registerCommandAndKeybindingRule({
792
- id: REMOVE_EXPRESSION_COMMAND_ID,
793
- weight: 200 ,
794
- when: ( (ContextKeyExpr.and(
795
- CONTEXT_WATCH_EXPRESSIONS_FOCUSED,
796
- (CONTEXT_EXPRESSION_SELECTED.toNegated())
797
- ))),
798
- primary: 20 ,
799
- mac: { primary: 2048 | 1 },
800
- handler: (accessor, expression) => {
801
- const debugService = accessor.get(IDebugService);
802
- if (expression instanceof Expression) {
803
- debugService.removeWatchExpressions(expression.getId());
804
- return;
805
- }
806
- const listService = accessor.get(IListService);
807
- const focused = listService.lastFocusedList;
808
- if (focused) {
809
- let elements = focused.getFocus();
810
- if (Array.isArray(elements) && elements[0] instanceof Expression) {
811
- const selection = focused.getSelection();
812
- if (selection && selection.indexOf(elements[0]) >= 0) {
813
- elements = selection;
814
- }
815
- elements.forEach((e) => debugService.removeWatchExpressions(e.getId()));
816
- }
817
- }
818
- }
819
- });
820
- KeybindingsRegistry.registerCommandAndKeybindingRule({
821
- id: 'debug.removeBreakpoint',
822
- weight: 200 ,
823
- when: ( (ContextKeyExpr.and(
824
- CONTEXT_BREAKPOINTS_FOCUSED,
825
- (CONTEXT_BREAKPOINT_INPUT_FOCUSED.toNegated())
826
- ))),
827
- primary: 20 ,
828
- mac: { primary: 2048 | 1 },
829
- handler: (accessor) => {
830
- const listService = accessor.get(IListService);
831
- const debugService = accessor.get(IDebugService);
832
- const list = listService.lastFocusedList;
833
- if (list instanceof List) {
834
- const focused = list.getFocusedElements();
835
- const element = focused.length ? focused[0] : undefined;
836
- if (element instanceof Breakpoint) {
837
- debugService.removeBreakpoints(element.getId());
838
- }
839
- else if (element instanceof FunctionBreakpoint) {
840
- debugService.removeFunctionBreakpoints(element.getId());
841
- }
842
- else if (element instanceof DataBreakpoint) {
843
- debugService.removeDataBreakpoints(element.getId());
844
- }
845
- }
846
- }
847
- });
848
- KeybindingsRegistry.registerCommandAndKeybindingRule({
849
- id: 'debug.installAdditionalDebuggers',
850
- weight: 200 ,
851
- when: undefined,
852
- primary: undefined,
853
- handler: async (accessor, query) => {
854
- const paneCompositeService = accessor.get(IPaneCompositePartService);
855
- const viewlet = (await paneCompositeService.openPaneComposite(VIEWLET_ID, 0 , true))?.getViewPaneContainer();
856
- let searchFor = `@category:debuggers`;
857
- if (typeof query === 'string') {
858
- searchFor += ` ${query}`;
859
- }
860
- viewlet.search(searchFor);
861
- viewlet.focus();
862
- }
863
- });
864
- registerAction2(class AddConfigurationAction extends Action2 {
865
- constructor() {
866
- super({
867
- id: ADD_CONFIGURATION_ID,
868
- title: ( localize2WithPath(_moduleId, 29, "Add Configuration...")),
869
- category: DEBUG_COMMAND_CATEGORY,
870
- f1: true,
871
- menu: {
872
- id: MenuId.EditorContent,
873
- when: ( (ContextKeyExpr.and(
874
- (ContextKeyExpr.regex(ResourceContextKey.Path.key, /\.vscode[/\\]launch\.json$/)),
875
- (ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID))
876
- )))
877
- }
878
- });
879
- }
880
- async run(accessor, launchUri) {
881
- const manager = accessor.get(IDebugService).getConfigurationManager();
882
- const launch = manager.getLaunches().find(l => ( (l.uri.toString())) === launchUri) || manager.selectedConfiguration.launch;
883
- if (launch) {
884
- const { editor, created } = await launch.openConfigFile({ preserveFocus: false });
885
- if (editor && !created) {
886
- const codeEditor = editor.getControl();
887
- if (codeEditor) {
888
- await codeEditor.getContribution(EDITOR_CONTRIBUTION_ID)?.addLaunchConfiguration();
889
- }
890
- }
891
- }
892
- }
893
- });
894
- const inlineBreakpointHandler = (accessor) => {
895
- const debugService = accessor.get(IDebugService);
896
- const editorService = accessor.get(IEditorService);
897
- const control = editorService.activeTextEditorControl;
898
- if (isCodeEditor(control)) {
899
- const position = control.getPosition();
900
- if (position && control.hasModel() && debugService.canSetBreakpointsIn(control.getModel())) {
901
- const modelUri = control.getModel().uri;
902
- const breakpointAlreadySet = ( (debugService.getModel().getBreakpoints({ lineNumber: position.lineNumber, uri: modelUri })
903
- .some(
904
- bp => (bp.sessionAgnosticData.column === position.column || (!bp.column && position.column <= 1))
905
- )));
906
- if (!breakpointAlreadySet) {
907
- debugService.addBreakpoints(modelUri, [{ lineNumber: position.lineNumber, column: position.column > 1 ? position.column : undefined }]);
908
- }
909
- }
910
- }
911
- };
912
- KeybindingsRegistry.registerCommandAndKeybindingRule({
913
- weight: 200 ,
914
- primary: 1024 | 67 ,
915
- when: EditorContextKeys.editorTextFocus,
916
- id: TOGGLE_INLINE_BREAKPOINT_ID,
917
- handler: inlineBreakpointHandler
918
- });
919
- MenuRegistry.appendMenuItem(MenuId.EditorContext, {
920
- command: {
921
- id: TOGGLE_INLINE_BREAKPOINT_ID,
922
- title: ( localizeWithPath(_moduleId, 30, "Add Inline Breakpoint")),
923
- category: DEBUG_COMMAND_CATEGORY
924
- },
925
- when: ( (ContextKeyExpr.and(
926
- CONTEXT_IN_DEBUG_MODE,
927
- (PanelFocusContext.toNegated()),
928
- EditorContextKeys.editorTextFocus
929
- ))),
930
- group: 'debug',
931
- order: 1
932
- });
933
- KeybindingsRegistry.registerCommandAndKeybindingRule({
934
- id: 'debug.openBreakpointToSide',
935
- weight: 200 ,
936
- when: CONTEXT_BREAKPOINTS_FOCUSED,
937
- primary: 2048 | 3 ,
938
- secondary: [512 | 3 ],
939
- handler: (accessor) => {
940
- const listService = accessor.get(IListService);
941
- const list = listService.lastFocusedList;
942
- if (list instanceof List) {
943
- const focus = list.getFocusedElements();
944
- if (focus.length && focus[0] instanceof Breakpoint) {
945
- return openBreakpointSource(focus[0], true, false, true, accessor.get(IDebugService), accessor.get(IEditorService));
946
- }
947
- }
948
- return undefined;
949
- }
950
- });
951
- KeybindingsRegistry.registerCommandAndKeybindingRule({
952
- id: 'debug.openView',
953
- weight: 200 ,
954
- when: ( (CONTEXT_DEBUGGERS_AVAILABLE.toNegated())),
955
- primary: 63 ,
956
- secondary: [2048 | 63 ],
957
- handler: async (accessor) => {
958
- const paneCompositeService = accessor.get(IPaneCompositePartService);
959
- await paneCompositeService.openPaneComposite(VIEWLET_ID$1, 0 , true);
960
- }
961
- });
962
-
963
- export { ADD_CONFIGURATION_ID, CALLSTACK_BOTTOM_ID, CALLSTACK_BOTTOM_LABEL, CALLSTACK_DOWN_ID, CALLSTACK_DOWN_LABEL, CALLSTACK_TOP_ID, CALLSTACK_TOP_LABEL, CALLSTACK_UP_ID, CALLSTACK_UP_LABEL, CONTINUE_ID, CONTINUE_LABEL, COPY_STACK_TRACE_ID, DEBUG_COMMAND_CATEGORY, DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL, DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, DEBUG_QUICK_ACCESS_PREFIX, DEBUG_RUN_COMMAND_ID, DEBUG_RUN_LABEL, DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, EDIT_EXPRESSION_COMMAND_ID, FOCUS_REPL_ID, FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, JUMP_TO_CURSOR_ID, NEXT_DEBUG_CONSOLE_ID, NEXT_DEBUG_CONSOLE_LABEL, OPEN_LOADED_SCRIPTS_LABEL, PAUSE_ID, PAUSE_LABEL, PREV_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL, REMOVE_EXPRESSION_COMMAND_ID, RESTART_FRAME_ID, RESTART_LABEL, RESTART_SESSION_ID, REVERSE_CONTINUE_ID, SELECT_AND_START_ID, SELECT_AND_START_LABEL, SELECT_DEBUG_CONSOLE_ID, SELECT_DEBUG_CONSOLE_LABEL, SELECT_DEBUG_SESSION_ID, SELECT_DEBUG_SESSION_LABEL, SET_EXPRESSION_COMMAND_ID, SHOW_LOADED_SCRIPTS_ID, STEP_BACK_ID, STEP_INTO_ID, STEP_INTO_LABEL, STEP_INTO_TARGET_ID, STEP_INTO_TARGET_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STOP_ID, STOP_LABEL, TERMINATE_THREAD_ID, TOGGLE_INLINE_BREAKPOINT_ID };