@codingame/monaco-vscode-debug-service-override 2.2.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/debug.js +1 -0
- package/package.json +2 -2
- package/tools/debugAssets.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +180 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +112 -50
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +7 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +14 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +2 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +5 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +19 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +18 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +33 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +130 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +28 -20
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +3 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +48 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +11 -24
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +64 -0
package/debug.js
CHANGED
|
@@ -8,6 +8,7 @@ import { IConfigurationResolverService } from 'vscode/vscode/vs/workbench/servic
|
|
|
8
8
|
import { IExtensionHostDebugService } from 'vscode/vscode/vs/platform/debug/common/extensionHostDebug';
|
|
9
9
|
import { BrowserExtensionHostDebugService } from './vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js';
|
|
10
10
|
import { IDebugVisualizerService, DebugVisualizerService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugVisualizers';
|
|
11
|
+
import './tools/debugAssets.js';
|
|
11
12
|
import './vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js';
|
|
12
13
|
|
|
13
14
|
const original = DebugService.prototype['showError'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-debug-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@3.1.0",
|
|
22
22
|
"vscode-marked": "npm:marked@=3.0.2"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -448,10 +448,10 @@ let SessionsRenderer = class SessionsRenderer {
|
|
|
448
448
|
const templateDisposable = ( new DisposableStore());
|
|
449
449
|
const stopActionViewItemDisposables = templateDisposable.add(( new DisposableStore()));
|
|
450
450
|
const actionBar = templateDisposable.add(( new ActionBar(session, {
|
|
451
|
-
actionViewItemProvider: action => {
|
|
451
|
+
actionViewItemProvider: (action, options) => {
|
|
452
452
|
if ((action.id === STOP_ID || action.id === DISCONNECT_ID) && action instanceof MenuItemAction) {
|
|
453
453
|
stopActionViewItemDisposables.clear();
|
|
454
|
-
const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, stopActionViewItemDisposables, accessor));
|
|
454
|
+
const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, stopActionViewItemDisposables, accessor, options));
|
|
455
455
|
if (item) {
|
|
456
456
|
return item;
|
|
457
457
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FileAccess } from 'vscode/vscode/vs/base/common/network';
|
|
1
2
|
import { isWeb, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
2
3
|
import './media/debug.contribution.css.js';
|
|
3
4
|
import './media/debugHover.css.js';
|
|
@@ -19,7 +20,7 @@ import { BreakpointsView } from 'vscode/vscode/vs/workbench/contrib/debug/browse
|
|
|
19
20
|
import { CallStackEditorContribution } from 'vscode/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution';
|
|
20
21
|
import { CallStackView } from './callStackView.js';
|
|
21
22
|
import { registerColors } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugColors';
|
|
22
|
-
import { DEBUG_QUICK_ACCESS_PREFIX, SELECT_AND_START_ID, DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, SELECT_DEBUG_CONSOLE_ID, TERMINATE_THREAD_ID, STEP_OVER_LABEL, STEP_OVER_ID, STEP_INTO_LABEL, STEP_INTO_ID, STEP_INTO_TARGET_LABEL, STEP_INTO_TARGET_ID, STEP_OUT_LABEL, STEP_OUT_ID, PAUSE_LABEL, PAUSE_ID, STOP_LABEL, STOP_ID, CONTINUE_LABEL, CONTINUE_ID, FOCUS_REPL_ID, JUMP_TO_CURSOR_ID, TOGGLE_INLINE_BREAKPOINT_ID, SELECT_AND_START_LABEL, CALLSTACK_TOP_LABEL, CALLSTACK_TOP_ID, CALLSTACK_BOTTOM_LABEL, CALLSTACK_BOTTOM_ID, CALLSTACK_UP_LABEL, CALLSTACK_UP_ID, CALLSTACK_DOWN_LABEL, CALLSTACK_DOWN_ID, RESTART_LABEL, RESTART_SESSION_ID,
|
|
23
|
+
import { DEBUG_QUICK_ACCESS_PREFIX, SELECT_AND_START_ID, DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, SELECT_DEBUG_CONSOLE_ID, TERMINATE_THREAD_ID, STEP_OVER_LABEL, STEP_OVER_ID, STEP_INTO_LABEL, STEP_INTO_ID, STEP_INTO_TARGET_LABEL, STEP_INTO_TARGET_ID, STEP_OUT_LABEL, STEP_OUT_ID, PAUSE_LABEL, PAUSE_ID, DISCONNECT_LABEL, DISCONNECT_ID, DISCONNECT_AND_SUSPEND_LABEL, DISCONNECT_AND_SUSPEND_ID, STOP_LABEL, STOP_ID, CONTINUE_LABEL, CONTINUE_ID, FOCUS_REPL_ID, JUMP_TO_CURSOR_ID, TOGGLE_INLINE_BREAKPOINT_ID, DEBUG_START_LABEL, DEBUG_START_COMMAND_ID, DEBUG_RUN_LABEL, DEBUG_RUN_COMMAND_ID, SELECT_AND_START_LABEL, CALLSTACK_TOP_LABEL, CALLSTACK_TOP_ID, CALLSTACK_BOTTOM_LABEL, CALLSTACK_BOTTOM_ID, CALLSTACK_UP_LABEL, CALLSTACK_UP_ID, CALLSTACK_DOWN_LABEL, CALLSTACK_DOWN_ID, RESTART_LABEL, RESTART_SESSION_ID, RESTART_FRAME_ID, COPY_STACK_TRACE_ID, EDIT_EXPRESSION_COMMAND_ID, SET_EXPRESSION_COMMAND_ID, REMOVE_EXPRESSION_COMMAND_ID, ADD_CONFIGURATION_ID, DEBUG_COMMAND_CATEGORY, NEXT_DEBUG_CONSOLE_LABEL, NEXT_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL, PREV_DEBUG_CONSOLE_ID, OPEN_LOADED_SCRIPTS_LABEL, SHOW_LOADED_SCRIPTS_ID, SELECT_DEBUG_CONSOLE_LABEL, SELECT_DEBUG_SESSION_LABEL, SELECT_DEBUG_SESSION_ID } from './debugCommands.js';
|
|
23
24
|
import { DebugConsoleQuickAccess } from './debugConsoleQuickAccess.js';
|
|
24
25
|
import { RunToCursorAction, SelectionToReplAction, SelectionToWatchExpressionsAction } from './debugEditorActions.js';
|
|
25
26
|
import { DebugEditorContribution } from './debugEditorContribution.js';
|
|
@@ -37,10 +38,11 @@ import { StatusBarColorProvider } from './statusbarColorProvider.js';
|
|
|
37
38
|
import { VIEW_MEMORY_ID, SET_VARIABLE_ID, COPY_VALUE_ID, COPY_EVALUATE_PATH_ID, ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_IS_READ_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, VariablesView } from './variablesView.js';
|
|
38
39
|
import { WatchExpressionsView, ADD_WATCH_LABEL, ADD_WATCH_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID } from './watchExpressionsView.js';
|
|
39
40
|
import { WelcomeView } from './welcomeView.js';
|
|
40
|
-
import { BREAKPOINT_EDITOR_CONTRIBUTION_ID, EDITOR_CONTRIBUTION_ID, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_DEBUGGERS_AVAILABLE, getStateLabel, CONTEXT_CALLSTACK_ITEM_TYPE,
|
|
41
|
+
import { BREAKPOINT_EDITOR_CONTRIBUTION_ID, EDITOR_CONTRIBUTION_ID, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_DEBUGGERS_AVAILABLE, getStateLabel, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, REPL_VIEW_ID, VIEWLET_ID, VARIABLES_VIEW_ID, CONTEXT_DEBUG_UX, WATCH_VIEW_ID, CALLSTACK_VIEW_ID, BREAKPOINTS_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_HAS_DEBUGGED, LOADED_SCRIPTS_VIEW_ID, CONTEXT_LOADED_SCRIPTS_SUPPORTED, DISASSEMBLY_VIEW_ID, INTERNAL_CONSOLE_OPTIONS_SCHEMA, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_VARIABLE_VALUE } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
41
42
|
import { DebugContentProvider } from '../common/debugContentProvider.js';
|
|
42
43
|
import { DebugLifecycle } from '../common/debugLifecycle.js';
|
|
43
44
|
import { DisassemblyViewInput } from 'vscode/vscode/vs/workbench/contrib/debug/common/disassemblyViewInput';
|
|
45
|
+
import { COPY_NOTEBOOK_VARIABLE_VALUE_LABEL, COPY_NOTEBOOK_VARIABLE_VALUE_ID } from '../../notebook/browser/contrib/notebookVariables/notebookVariableCommands.js';
|
|
44
46
|
import { launchSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
|
|
45
47
|
|
|
46
48
|
const debugCategory = ( localizeWithPath(
|
|
@@ -108,6 +110,7 @@ const registerDebugCommandPaletteItem = (id, title, when, precondition) => {
|
|
|
108
110
|
}
|
|
109
111
|
});
|
|
110
112
|
};
|
|
113
|
+
registerDebugCommandPaletteItem(RESTART_SESSION_ID, RESTART_LABEL);
|
|
111
114
|
registerDebugCommandPaletteItem(TERMINATE_THREAD_ID, ( localize2WithPath(
|
|
112
115
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
113
116
|
'terminateThread',
|
|
@@ -118,6 +121,8 @@ registerDebugCommandPaletteItem(STEP_INTO_ID, STEP_INTO_LABEL, CONTEXT_IN_DEBUG_
|
|
|
118
121
|
registerDebugCommandPaletteItem(STEP_INTO_TARGET_ID, STEP_INTO_TARGET_LABEL, CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.and(CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')))));
|
|
119
122
|
registerDebugCommandPaletteItem(STEP_OUT_ID, STEP_OUT_LABEL, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
120
123
|
registerDebugCommandPaletteItem(PAUSE_ID, PAUSE_LABEL, CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.and(( CONTEXT_DEBUG_STATE.isEqualTo('running')), ( CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG.toNegated()))));
|
|
124
|
+
registerDebugCommandPaletteItem(DISCONNECT_ID, DISCONNECT_LABEL, CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.or(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)));
|
|
125
|
+
registerDebugCommandPaletteItem(DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL, CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.or(CONTEXT_FOCUSED_SESSION_IS_ATTACH, ( ContextKeyExpr.and(CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)))));
|
|
121
126
|
registerDebugCommandPaletteItem(STOP_ID, STOP_LABEL, CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.or(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)));
|
|
122
127
|
registerDebugCommandPaletteItem(CONTINUE_ID, CONTINUE_LABEL, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
123
128
|
registerDebugCommandPaletteItem(FOCUS_REPL_ID, ( localize2WithPath(
|
|
@@ -143,6 +148,8 @@ registerDebugCommandPaletteItem(TOGGLE_INLINE_BREAKPOINT_ID, ( localize2WithPath
|
|
|
143
148
|
'inlineBreakpoint',
|
|
144
149
|
"Inline Breakpoint"
|
|
145
150
|
)));
|
|
151
|
+
registerDebugCommandPaletteItem(DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 ))))));
|
|
152
|
+
registerDebugCommandPaletteItem(DEBUG_RUN_COMMAND_ID, DEBUG_RUN_LABEL, ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 ))))));
|
|
146
153
|
registerDebugCommandPaletteItem(SELECT_AND_START_ID, SELECT_AND_START_LABEL, ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 ))))));
|
|
147
154
|
registerDebugCommandPaletteItem(NEXT_DEBUG_CONSOLE_ID, NEXT_DEBUG_CONSOLE_LABEL);
|
|
148
155
|
registerDebugCommandPaletteItem(PREV_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL);
|
|
@@ -293,6 +300,30 @@ registerDebugViewMenuItem(MenuId.DebugWatchContext, REMOVE_EXPRESSION_COMMAND_ID
|
|
|
293
300
|
"Remove Expression"
|
|
294
301
|
)), 20, ( CONTEXT_WATCH_ITEM_TYPE.isEqualTo('expression')), undefined, 'inline', watchExpressionRemove);
|
|
295
302
|
registerDebugViewMenuItem(MenuId.DebugWatchContext, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, 20, undefined, undefined, 'z_commands');
|
|
303
|
+
registerDebugViewMenuItem(MenuId.NotebookVariablesContext, COPY_NOTEBOOK_VARIABLE_VALUE_ID, COPY_NOTEBOOK_VARIABLE_VALUE_LABEL, 20, CONTEXT_VARIABLE_VALUE);
|
|
304
|
+
if (isMacintosh) {
|
|
305
|
+
const registerTouchBarEntry = (id, title, order, when, iconUri) => {
|
|
306
|
+
MenuRegistry.appendMenuItem(MenuId.TouchBarContext, {
|
|
307
|
+
command: {
|
|
308
|
+
id,
|
|
309
|
+
title,
|
|
310
|
+
icon: { dark: iconUri }
|
|
311
|
+
},
|
|
312
|
+
when: ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, when)),
|
|
313
|
+
group: '9_debug',
|
|
314
|
+
order
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
registerTouchBarEntry(DEBUG_RUN_COMMAND_ID, DEBUG_RUN_LABEL, 0, ( CONTEXT_IN_DEBUG_MODE.toNegated()), ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/continue-tb.png')));
|
|
318
|
+
registerTouchBarEntry(DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, 1, ( CONTEXT_IN_DEBUG_MODE.toNegated()), ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/run-with-debugging-tb.png')));
|
|
319
|
+
registerTouchBarEntry(CONTINUE_ID, CONTINUE_LABEL, 0, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')), ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/continue-tb.png')));
|
|
320
|
+
registerTouchBarEntry(PAUSE_ID, PAUSE_LABEL, 1, ( ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.and(( CONTEXT_DEBUG_STATE.isEqualTo('running')), ( CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG.toNegated()))))), ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/pause-tb.png')));
|
|
321
|
+
registerTouchBarEntry(STEP_OVER_ID, STEP_OVER_LABEL, 2, CONTEXT_IN_DEBUG_MODE, ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/stepover-tb.png')));
|
|
322
|
+
registerTouchBarEntry(STEP_INTO_ID, STEP_INTO_LABEL, 3, CONTEXT_IN_DEBUG_MODE, ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/stepinto-tb.png')));
|
|
323
|
+
registerTouchBarEntry(STEP_OUT_ID, STEP_OUT_LABEL, 4, CONTEXT_IN_DEBUG_MODE, ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/stepout-tb.png')));
|
|
324
|
+
registerTouchBarEntry(RESTART_SESSION_ID, RESTART_LABEL, 5, CONTEXT_IN_DEBUG_MODE, ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/restart-tb.png')));
|
|
325
|
+
registerTouchBarEntry(STOP_ID, STOP_LABEL, 6, CONTEXT_IN_DEBUG_MODE, ( FileAccess.asFileUri('vs/workbench/contrib/debug/browser/media/stop-tb.png')));
|
|
326
|
+
}
|
|
296
327
|
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { submenu: MenuId.EditorTitleRun, rememberDefaultAction: true, title: ( localize2WithPath(
|
|
297
328
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
298
329
|
'run',
|
|
@@ -301,8 +332,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { submenu: MenuId.EditorTitleRun
|
|
|
301
332
|
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
302
333
|
submenu: MenuId.MenubarDebugMenu,
|
|
303
334
|
title: {
|
|
304
|
-
|
|
305
|
-
original: 'Run',
|
|
335
|
+
...( localize2WithPath('vs/workbench/contrib/debug/browser/debug.contribution', 'runMenu', "Run")),
|
|
306
336
|
mnemonicTitle: ( localizeWithPath(
|
|
307
337
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
308
338
|
{ key: 'mRun', comment: ['&& denotes a mnemonic'] },
|
|
@@ -311,6 +341,129 @@ MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
|
311
341
|
},
|
|
312
342
|
order: 6
|
|
313
343
|
});
|
|
344
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
345
|
+
group: '1_debug',
|
|
346
|
+
command: {
|
|
347
|
+
id: DEBUG_START_COMMAND_ID,
|
|
348
|
+
title: ( localizeWithPath(
|
|
349
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
350
|
+
{ key: 'miStartDebugging', comment: ['&& denotes a mnemonic'] },
|
|
351
|
+
"&&Start Debugging"
|
|
352
|
+
))
|
|
353
|
+
},
|
|
354
|
+
order: 1,
|
|
355
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
356
|
+
});
|
|
357
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
358
|
+
group: '1_debug',
|
|
359
|
+
command: {
|
|
360
|
+
id: DEBUG_RUN_COMMAND_ID,
|
|
361
|
+
title: ( localizeWithPath(
|
|
362
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
363
|
+
{ key: 'miRun', comment: ['&& denotes a mnemonic'] },
|
|
364
|
+
"Run &&Without Debugging"
|
|
365
|
+
))
|
|
366
|
+
},
|
|
367
|
+
order: 2,
|
|
368
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
369
|
+
});
|
|
370
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
371
|
+
group: '1_debug',
|
|
372
|
+
command: {
|
|
373
|
+
id: STOP_ID,
|
|
374
|
+
title: ( localizeWithPath(
|
|
375
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
376
|
+
{ key: 'miStopDebugging', comment: ['&& denotes a mnemonic'] },
|
|
377
|
+
"&&Stop Debugging"
|
|
378
|
+
)),
|
|
379
|
+
precondition: CONTEXT_IN_DEBUG_MODE
|
|
380
|
+
},
|
|
381
|
+
order: 3,
|
|
382
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
383
|
+
});
|
|
384
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
385
|
+
group: '1_debug',
|
|
386
|
+
command: {
|
|
387
|
+
id: RESTART_SESSION_ID,
|
|
388
|
+
title: ( localizeWithPath(
|
|
389
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
390
|
+
{ key: 'miRestart Debugging', comment: ['&& denotes a mnemonic'] },
|
|
391
|
+
"&&Restart Debugging"
|
|
392
|
+
)),
|
|
393
|
+
precondition: CONTEXT_IN_DEBUG_MODE
|
|
394
|
+
},
|
|
395
|
+
order: 4,
|
|
396
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
397
|
+
});
|
|
398
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
399
|
+
group: '2_configuration',
|
|
400
|
+
command: {
|
|
401
|
+
id: ADD_CONFIGURATION_ID,
|
|
402
|
+
title: ( localizeWithPath(
|
|
403
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
404
|
+
{ key: 'miAddConfiguration', comment: ['&& denotes a mnemonic'] },
|
|
405
|
+
"A&&dd Configuration..."
|
|
406
|
+
))
|
|
407
|
+
},
|
|
408
|
+
order: 2,
|
|
409
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
410
|
+
});
|
|
411
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
412
|
+
group: '3_step',
|
|
413
|
+
command: {
|
|
414
|
+
id: STEP_OVER_ID,
|
|
415
|
+
title: ( localizeWithPath(
|
|
416
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
417
|
+
{ key: 'miStepOver', comment: ['&& denotes a mnemonic'] },
|
|
418
|
+
"Step &&Over"
|
|
419
|
+
)),
|
|
420
|
+
precondition: ( CONTEXT_DEBUG_STATE.isEqualTo('stopped'))
|
|
421
|
+
},
|
|
422
|
+
order: 1,
|
|
423
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
424
|
+
});
|
|
425
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
426
|
+
group: '3_step',
|
|
427
|
+
command: {
|
|
428
|
+
id: STEP_INTO_ID,
|
|
429
|
+
title: ( localizeWithPath(
|
|
430
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
431
|
+
{ key: 'miStepInto', comment: ['&& denotes a mnemonic'] },
|
|
432
|
+
"Step &&Into"
|
|
433
|
+
)),
|
|
434
|
+
precondition: ( CONTEXT_DEBUG_STATE.isEqualTo('stopped'))
|
|
435
|
+
},
|
|
436
|
+
order: 2,
|
|
437
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
438
|
+
});
|
|
439
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
440
|
+
group: '3_step',
|
|
441
|
+
command: {
|
|
442
|
+
id: STEP_OUT_ID,
|
|
443
|
+
title: ( localizeWithPath(
|
|
444
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
445
|
+
{ key: 'miStepOut', comment: ['&& denotes a mnemonic'] },
|
|
446
|
+
"Step O&&ut"
|
|
447
|
+
)),
|
|
448
|
+
precondition: ( CONTEXT_DEBUG_STATE.isEqualTo('stopped'))
|
|
449
|
+
},
|
|
450
|
+
order: 3,
|
|
451
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
452
|
+
});
|
|
453
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
454
|
+
group: '3_step',
|
|
455
|
+
command: {
|
|
456
|
+
id: CONTINUE_ID,
|
|
457
|
+
title: ( localizeWithPath(
|
|
458
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
459
|
+
{ key: 'miContinue', comment: ['&& denotes a mnemonic'] },
|
|
460
|
+
"&&Continue"
|
|
461
|
+
)),
|
|
462
|
+
precondition: ( CONTEXT_DEBUG_STATE.isEqualTo('stopped'))
|
|
463
|
+
},
|
|
464
|
+
order: 4,
|
|
465
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
466
|
+
});
|
|
314
467
|
MenuRegistry.appendMenuItem(MenuId.MenubarNewBreakpointMenu, {
|
|
315
468
|
group: '1_breakpoints',
|
|
316
469
|
command: {
|
|
@@ -324,6 +477,29 @@ MenuRegistry.appendMenuItem(MenuId.MenubarNewBreakpointMenu, {
|
|
|
324
477
|
order: 2,
|
|
325
478
|
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
326
479
|
});
|
|
480
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
481
|
+
group: '4_new_breakpoint',
|
|
482
|
+
title: ( localizeWithPath(
|
|
483
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
484
|
+
{ key: 'miNewBreakpoint', comment: ['&& denotes a mnemonic'] },
|
|
485
|
+
"&&New Breakpoint"
|
|
486
|
+
)),
|
|
487
|
+
submenu: MenuId.MenubarNewBreakpointMenu,
|
|
488
|
+
order: 2,
|
|
489
|
+
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
490
|
+
});
|
|
491
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarDebugMenu, {
|
|
492
|
+
group: 'z_install',
|
|
493
|
+
command: {
|
|
494
|
+
id: 'debug.installAdditionalDebuggers',
|
|
495
|
+
title: ( localizeWithPath(
|
|
496
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
497
|
+
{ key: 'miInstallAdditionalDebuggers', comment: ['&& denotes a mnemonic'] },
|
|
498
|
+
"&&Install Additional Debuggers..."
|
|
499
|
+
))
|
|
500
|
+
},
|
|
501
|
+
order: 1
|
|
502
|
+
});
|
|
327
503
|
const VIEW_CONTAINER = ( Registry.as(Extensions$2.ViewContainersRegistry)).registerViewContainer({
|
|
328
504
|
id: DEBUG_PANEL_ID,
|
|
329
505
|
title: ( localize2WithPath(
|
|
@@ -22,8 +22,8 @@ const $ = $$1;
|
|
|
22
22
|
let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseActionViewItem {
|
|
23
23
|
static { StartDebugActionViewItem_1 = this; }
|
|
24
24
|
static { this.SEPARATOR = '\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500'; }
|
|
25
|
-
constructor(context, action, debugService, configurationService, commandService, contextService, contextViewService, keybindingService) {
|
|
26
|
-
super(context, action);
|
|
25
|
+
constructor(context, action, options, debugService, configurationService, commandService, contextService, contextViewService, keybindingService) {
|
|
26
|
+
super(context, action, options);
|
|
27
27
|
this.context = context;
|
|
28
28
|
this.debugService = debugService;
|
|
29
29
|
this.configurationService = configurationService;
|
|
@@ -245,12 +245,12 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
|
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
247
|
StartDebugActionViewItem = StartDebugActionViewItem_1 = ( __decorate([
|
|
248
|
-
( __param(
|
|
249
|
-
( __param(
|
|
250
|
-
( __param(
|
|
251
|
-
( __param(
|
|
252
|
-
( __param(
|
|
253
|
-
( __param(
|
|
248
|
+
( __param(3, IDebugService)),
|
|
249
|
+
( __param(4, IConfigurationService)),
|
|
250
|
+
( __param(5, ICommandService)),
|
|
251
|
+
( __param(6, IWorkspaceContextService)),
|
|
252
|
+
( __param(7, IContextViewService)),
|
|
253
|
+
( __param(8, IKeybindingService))
|
|
254
254
|
], StartDebugActionViewItem));
|
|
255
255
|
let FocusSessionActionViewItem = class FocusSessionActionViewItem extends SelectActionViewItem {
|
|
256
256
|
constructor(action, session, debugService, contextViewService, configurationService) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
1
|
+
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
2
|
import { List } from 'vscode/vscode/vs/base/browser/ui/list/listWidget';
|
|
3
3
|
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
4
4
|
import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
5
|
-
import { IDebugService, 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, REPL_VIEW_ID, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED, CONTEXT_EXPRESSION_SELECTED, CONTEXT_BREAKPOINT_INPUT_FOCUSED, EDITOR_CONTRIBUTION_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
5
|
+
import { IDebugService, 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, REPL_VIEW_ID, 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
6
|
import { Expression, Variable, Breakpoint, FunctionBreakpoint, DataBreakpoint } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
7
|
+
import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
7
8
|
import { isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
8
9
|
import { MenuRegistry, MenuId, registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
9
10
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
@@ -13,13 +14,16 @@ import { openBreakpointSource } from 'vscode/vscode/vs/workbench/contrib/debug/b
|
|
|
13
14
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
14
15
|
import { InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
15
16
|
import { ResourceContextKey, ActiveEditorContext, PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
16
|
-
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
17
|
+
import { CommandsRegistry, ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
17
18
|
import { ITextResourcePropertiesService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
|
|
18
19
|
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService';
|
|
19
20
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
20
21
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
|
|
21
22
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
|
|
23
|
+
import { deepClone } from 'vscode/vscode/vs/base/common/objects';
|
|
22
24
|
import { isWeb, isWindows } from 'vscode/vscode/vs/base/common/platform';
|
|
25
|
+
import { saveAllBeforeDebugStart } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
26
|
+
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
|
|
23
27
|
import { showLoadedScriptMenu } from '../common/loadedScriptsPicker.js';
|
|
24
28
|
import { showDebugSessionMenu } from './debugSessionPicker.js';
|
|
25
29
|
import { TEXT_FILE_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
@@ -49,6 +53,7 @@ const SELECT_DEBUG_CONSOLE_ID = 'workbench.action.debug.selectDebugConsole';
|
|
|
49
53
|
const SELECT_DEBUG_SESSION_ID = 'workbench.action.debug.selectDebugSession';
|
|
50
54
|
const DEBUG_CONFIGURE_COMMAND_ID = 'workbench.action.debug.configure';
|
|
51
55
|
const DEBUG_START_COMMAND_ID = 'workbench.action.debug.start';
|
|
56
|
+
const DEBUG_RUN_COMMAND_ID = 'workbench.action.debug.run';
|
|
52
57
|
const EDIT_EXPRESSION_COMMAND_ID = 'debug.renameWatchExpression';
|
|
53
58
|
const SET_EXPRESSION_COMMAND_ID = 'debug.setWatchExpression';
|
|
54
59
|
const REMOVE_EXPRESSION_COMMAND_ID = 'debug.removeWatchExpression';
|
|
@@ -59,115 +64,120 @@ const CALLSTACK_TOP_ID = 'workbench.action.debug.callStackTop';
|
|
|
59
64
|
const CALLSTACK_BOTTOM_ID = 'workbench.action.debug.callStackBottom';
|
|
60
65
|
const CALLSTACK_UP_ID = 'workbench.action.debug.callStackUp';
|
|
61
66
|
const CALLSTACK_DOWN_ID = 'workbench.action.debug.callStackDown';
|
|
62
|
-
const DEBUG_COMMAND_CATEGORY =
|
|
63
|
-
const RESTART_LABEL =
|
|
67
|
+
const DEBUG_COMMAND_CATEGORY = ( localize2WithPath('vs/workbench/contrib/debug/browser/debugCommands', 'debug', 'Debug'));
|
|
68
|
+
const RESTART_LABEL = ( localize2WithPath(
|
|
64
69
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
65
70
|
'restartDebug',
|
|
66
71
|
"Restart"
|
|
67
|
-
))
|
|
68
|
-
const STEP_OVER_LABEL =
|
|
72
|
+
));
|
|
73
|
+
const STEP_OVER_LABEL = ( localize2WithPath(
|
|
69
74
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
70
75
|
'stepOverDebug',
|
|
71
76
|
"Step Over"
|
|
72
|
-
))
|
|
73
|
-
const STEP_INTO_LABEL =
|
|
77
|
+
));
|
|
78
|
+
const STEP_INTO_LABEL = ( localize2WithPath(
|
|
74
79
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
75
80
|
'stepIntoDebug',
|
|
76
81
|
"Step Into"
|
|
77
|
-
))
|
|
78
|
-
const STEP_INTO_TARGET_LABEL =
|
|
82
|
+
));
|
|
83
|
+
const STEP_INTO_TARGET_LABEL = ( localize2WithPath(
|
|
79
84
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
80
85
|
'stepIntoTargetDebug',
|
|
81
86
|
"Step Into Target"
|
|
82
|
-
))
|
|
83
|
-
const STEP_OUT_LABEL =
|
|
87
|
+
));
|
|
88
|
+
const STEP_OUT_LABEL = ( localize2WithPath(
|
|
84
89
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
85
90
|
'stepOutDebug',
|
|
86
91
|
"Step Out"
|
|
87
|
-
))
|
|
88
|
-
const PAUSE_LABEL =
|
|
89
|
-
const DISCONNECT_LABEL =
|
|
92
|
+
));
|
|
93
|
+
const PAUSE_LABEL = ( localize2WithPath('vs/workbench/contrib/debug/browser/debugCommands', 'pauseDebug', "Pause"));
|
|
94
|
+
const DISCONNECT_LABEL = ( localize2WithPath(
|
|
90
95
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
91
96
|
'disconnect',
|
|
92
97
|
"Disconnect"
|
|
93
|
-
))
|
|
94
|
-
const DISCONNECT_AND_SUSPEND_LABEL =
|
|
98
|
+
));
|
|
99
|
+
const DISCONNECT_AND_SUSPEND_LABEL = ( localize2WithPath(
|
|
95
100
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
96
101
|
'disconnectSuspend',
|
|
97
102
|
"Disconnect and Suspend"
|
|
98
|
-
))
|
|
99
|
-
const STOP_LABEL =
|
|
100
|
-
const CONTINUE_LABEL =
|
|
103
|
+
));
|
|
104
|
+
const STOP_LABEL = ( localize2WithPath('vs/workbench/contrib/debug/browser/debugCommands', 'stop', "Stop"));
|
|
105
|
+
const CONTINUE_LABEL = ( localize2WithPath(
|
|
101
106
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
102
107
|
'continueDebug',
|
|
103
108
|
"Continue"
|
|
104
|
-
))
|
|
105
|
-
const FOCUS_SESSION_LABEL =
|
|
109
|
+
));
|
|
110
|
+
const FOCUS_SESSION_LABEL = ( localize2WithPath(
|
|
106
111
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
107
112
|
'focusSession',
|
|
108
113
|
"Focus Session"
|
|
109
|
-
))
|
|
110
|
-
const SELECT_AND_START_LABEL =
|
|
114
|
+
));
|
|
115
|
+
const SELECT_AND_START_LABEL = ( localize2WithPath(
|
|
111
116
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
112
117
|
'selectAndStartDebugging',
|
|
113
118
|
"Select and Start Debugging"
|
|
114
|
-
))
|
|
119
|
+
));
|
|
115
120
|
const DEBUG_CONFIGURE_LABEL = ( localizeWithPath(
|
|
116
121
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
117
122
|
'openLaunchJson',
|
|
118
123
|
"Open '{0}'",
|
|
119
124
|
'launch.json'
|
|
120
125
|
));
|
|
121
|
-
const DEBUG_START_LABEL =
|
|
126
|
+
const DEBUG_START_LABEL = ( localize2WithPath(
|
|
122
127
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
123
128
|
'startDebug',
|
|
124
129
|
"Start Debugging"
|
|
125
|
-
))
|
|
126
|
-
const
|
|
130
|
+
));
|
|
131
|
+
const DEBUG_RUN_LABEL = ( localize2WithPath(
|
|
132
|
+
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
133
|
+
'startWithoutDebugging',
|
|
134
|
+
"Start Without Debugging"
|
|
135
|
+
));
|
|
136
|
+
const NEXT_DEBUG_CONSOLE_LABEL = ( localize2WithPath(
|
|
127
137
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
128
138
|
'nextDebugConsole',
|
|
129
139
|
"Focus Next Debug Console"
|
|
130
|
-
))
|
|
131
|
-
const PREV_DEBUG_CONSOLE_LABEL =
|
|
140
|
+
));
|
|
141
|
+
const PREV_DEBUG_CONSOLE_LABEL = ( localize2WithPath(
|
|
132
142
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
133
143
|
'prevDebugConsole',
|
|
134
144
|
"Focus Previous Debug Console"
|
|
135
|
-
))
|
|
136
|
-
const OPEN_LOADED_SCRIPTS_LABEL =
|
|
145
|
+
));
|
|
146
|
+
const OPEN_LOADED_SCRIPTS_LABEL = ( localize2WithPath(
|
|
137
147
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
138
148
|
'openLoadedScript',
|
|
139
149
|
"Open Loaded Script..."
|
|
140
|
-
))
|
|
141
|
-
const CALLSTACK_TOP_LABEL =
|
|
150
|
+
));
|
|
151
|
+
const CALLSTACK_TOP_LABEL = ( localize2WithPath(
|
|
142
152
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
143
153
|
'callStackTop',
|
|
144
154
|
"Navigate to Top of Call Stack"
|
|
145
|
-
))
|
|
146
|
-
const CALLSTACK_BOTTOM_LABEL =
|
|
155
|
+
));
|
|
156
|
+
const CALLSTACK_BOTTOM_LABEL = ( localize2WithPath(
|
|
147
157
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
148
158
|
'callStackBottom',
|
|
149
159
|
"Navigate to Bottom of Call Stack"
|
|
150
|
-
))
|
|
151
|
-
const CALLSTACK_UP_LABEL =
|
|
160
|
+
));
|
|
161
|
+
const CALLSTACK_UP_LABEL = ( localize2WithPath(
|
|
152
162
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
153
163
|
'callStackUp',
|
|
154
164
|
"Navigate Up Call Stack"
|
|
155
|
-
))
|
|
156
|
-
const CALLSTACK_DOWN_LABEL =
|
|
165
|
+
));
|
|
166
|
+
const CALLSTACK_DOWN_LABEL = ( localize2WithPath(
|
|
157
167
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
158
168
|
'callStackDown',
|
|
159
169
|
"Navigate Down Call Stack"
|
|
160
|
-
))
|
|
161
|
-
const SELECT_DEBUG_CONSOLE_LABEL =
|
|
170
|
+
));
|
|
171
|
+
const SELECT_DEBUG_CONSOLE_LABEL = ( localize2WithPath(
|
|
162
172
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
163
173
|
'selectDebugConsole',
|
|
164
174
|
"Select Debug Console"
|
|
165
|
-
))
|
|
166
|
-
const SELECT_DEBUG_SESSION_LABEL =
|
|
175
|
+
));
|
|
176
|
+
const SELECT_DEBUG_SESSION_LABEL = ( localize2WithPath(
|
|
167
177
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
168
178
|
'selectDebugSession',
|
|
169
179
|
"Select Debug Session"
|
|
170
|
-
))
|
|
180
|
+
));
|
|
171
181
|
const DEBUG_QUICK_ACCESS_PREFIX = 'debug ';
|
|
172
182
|
const DEBUG_CONSOLE_QUICK_ACCESS_PREFIX = 'debug consoles ';
|
|
173
183
|
function isThreadContext(obj) {
|
|
@@ -275,7 +285,7 @@ async function navigateCallStack(debugService, down) {
|
|
|
275
285
|
nextVisibleFrame = findNextVisibleFrame(false, callStack, index);
|
|
276
286
|
}
|
|
277
287
|
if (nextVisibleFrame) {
|
|
278
|
-
debugService.focusStackFrame(nextVisibleFrame);
|
|
288
|
+
debugService.focusStackFrame(nextVisibleFrame, undefined, undefined, { preserveFocus: false });
|
|
279
289
|
}
|
|
280
290
|
}
|
|
281
291
|
}
|
|
@@ -744,6 +754,31 @@ CommandsRegistry.registerCommand({
|
|
|
744
754
|
showDebugSessionMenu(accessor, SELECT_AND_START_ID);
|
|
745
755
|
}
|
|
746
756
|
});
|
|
757
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
758
|
+
id: DEBUG_START_COMMAND_ID,
|
|
759
|
+
weight: 200 ,
|
|
760
|
+
primary: 63 ,
|
|
761
|
+
when: ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( CONTEXT_DEBUG_STATE.isEqualTo('inactive')))),
|
|
762
|
+
handler: async (accessor, debugStartOptions) => {
|
|
763
|
+
const debugService = accessor.get(IDebugService);
|
|
764
|
+
await saveAllBeforeDebugStart(accessor.get(IConfigurationService), accessor.get(IEditorService));
|
|
765
|
+
const { launch, name, getConfig } = debugService.getConfigurationManager().selectedConfiguration;
|
|
766
|
+
const config = await getConfig();
|
|
767
|
+
const configOrName = config ? Object.assign(deepClone(config), debugStartOptions?.config) : name;
|
|
768
|
+
await debugService.startDebugging(launch, configOrName, { noDebug: debugStartOptions?.noDebug, startedByUser: true }, false);
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
772
|
+
id: DEBUG_RUN_COMMAND_ID,
|
|
773
|
+
weight: 200 ,
|
|
774
|
+
primary: 2048 | 63 ,
|
|
775
|
+
mac: { primary: 256 | 63 },
|
|
776
|
+
when: ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 ))))),
|
|
777
|
+
handler: async (accessor) => {
|
|
778
|
+
const commandService = accessor.get(ICommandService);
|
|
779
|
+
await commandService.executeCommand(DEBUG_START_COMMAND_ID, { noDebug: true });
|
|
780
|
+
}
|
|
781
|
+
});
|
|
747
782
|
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
748
783
|
id: 'debug.toggleBreakpoint',
|
|
749
784
|
weight: 200 + 5,
|
|
@@ -885,15 +920,31 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
885
920
|
}
|
|
886
921
|
}
|
|
887
922
|
});
|
|
923
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
924
|
+
id: 'debug.installAdditionalDebuggers',
|
|
925
|
+
weight: 200 ,
|
|
926
|
+
when: undefined,
|
|
927
|
+
primary: undefined,
|
|
928
|
+
handler: async (accessor, query) => {
|
|
929
|
+
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
930
|
+
const viewlet = (await paneCompositeService.openPaneComposite(VIEWLET_ID, 0 , true))?.getViewPaneContainer();
|
|
931
|
+
let searchFor = `@category:debuggers`;
|
|
932
|
+
if (typeof query === 'string') {
|
|
933
|
+
searchFor += ` ${query}`;
|
|
934
|
+
}
|
|
935
|
+
viewlet.search(searchFor);
|
|
936
|
+
viewlet.focus();
|
|
937
|
+
}
|
|
938
|
+
});
|
|
888
939
|
registerAction2(class AddConfigurationAction extends Action2 {
|
|
889
940
|
constructor() {
|
|
890
941
|
super({
|
|
891
942
|
id: ADD_CONFIGURATION_ID,
|
|
892
|
-
title:
|
|
943
|
+
title: ( localize2WithPath(
|
|
893
944
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
894
945
|
'addConfiguration',
|
|
895
946
|
"Add Configuration..."
|
|
896
|
-
)),
|
|
947
|
+
)),
|
|
897
948
|
category: DEBUG_COMMAND_CATEGORY,
|
|
898
949
|
f1: true,
|
|
899
950
|
menu: {
|
|
@@ -973,5 +1024,16 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
973
1024
|
return undefined;
|
|
974
1025
|
}
|
|
975
1026
|
});
|
|
1027
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
1028
|
+
id: 'debug.openView',
|
|
1029
|
+
weight: 200 ,
|
|
1030
|
+
when: ( CONTEXT_DEBUGGERS_AVAILABLE.toNegated()),
|
|
1031
|
+
primary: 63 ,
|
|
1032
|
+
secondary: [2048 | 63 ],
|
|
1033
|
+
handler: async (accessor) => {
|
|
1034
|
+
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
1035
|
+
await paneCompositeService.openPaneComposite(VIEWLET_ID$1, 0 , true);
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
976
1038
|
|
|
977
|
-
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_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 };
|
|
1039
|
+
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 };
|