@codingame/monaco-vscode-debug-service-override 2.2.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/continue-tb.png +0 -0
- package/assets/pause-tb.png +0 -0
- package/assets/restart-tb.png +0 -0
- package/assets/run-with-debugging-tb.png +0 -0
- package/assets/stepinto-tb.png +0 -0
- package/assets/stepout-tb.png +0 -0
- package/assets/stepover-tb.png +0 -0
- package/assets/stop-tb.png +0 -0
- 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/media/all.png.js +12 -0
- 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
|
@@ -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 };
|
|
@@ -7,7 +7,7 @@ import { Position } from 'vscode/vscode/vs/editor/common/core/position';
|
|
|
7
7
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
8
8
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
9
9
|
import { MessageController } from 'vscode/vscode/vs/editor/contrib/message/browser/messageController';
|
|
10
|
-
import {
|
|
10
|
+
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
11
11
|
import { Action2, MenuId, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
12
12
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
13
13
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
@@ -27,12 +27,11 @@ class ToggleBreakpointAction extends Action2 {
|
|
|
27
27
|
super({
|
|
28
28
|
id: 'editor.debug.action.toggleBreakpoint',
|
|
29
29
|
title: {
|
|
30
|
-
|
|
30
|
+
...( localize2WithPath(
|
|
31
31
|
'vs/workbench/contrib/debug/browser/debugEditorActions',
|
|
32
32
|
'toggleBreakpointAction',
|
|
33
33
|
"Debug: Toggle Breakpoint"
|
|
34
34
|
)),
|
|
35
|
-
original: 'Debug: Toggle Breakpoint',
|
|
36
35
|
mnemonicTitle: ( localizeWithPath(
|
|
37
36
|
'vs/workbench/contrib/debug/browser/debugEditorActions',
|
|
38
37
|
{ key: 'miToggleBreakpoint', comment: ['&& denotes a mnemonic'] },
|
|
@@ -66,7 +65,7 @@ class ToggleBreakpointAction extends Action2 {
|
|
|
66
65
|
debugService.removeInstructionBreakpoints(toRemove.instructionReference, toRemove.offset);
|
|
67
66
|
}
|
|
68
67
|
else {
|
|
69
|
-
debugService.addInstructionBreakpoint(location.reference, location.offset, location.address);
|
|
68
|
+
debugService.addInstructionBreakpoint({ instructionReference: location.reference, offset: location.offset, address: location.address, canPersist: false });
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
return;
|
|
@@ -241,17 +240,16 @@ class OpenDisassemblyViewAction extends Action2 {
|
|
|
241
240
|
super({
|
|
242
241
|
id: OpenDisassemblyViewAction.ID,
|
|
243
242
|
title: {
|
|
244
|
-
|
|
243
|
+
...( localize2WithPath(
|
|
245
244
|
'vs/workbench/contrib/debug/browser/debugEditorActions',
|
|
246
245
|
'openDisassemblyView',
|
|
247
246
|
"Open Disassembly View"
|
|
248
247
|
)),
|
|
249
|
-
original: 'Open Disassembly View',
|
|
250
248
|
mnemonicTitle: ( localizeWithPath(
|
|
251
249
|
'vs/workbench/contrib/debug/browser/debugEditorActions',
|
|
252
250
|
{ key: 'miDisassemblyView', comment: ['&& denotes a mnemonic'] },
|
|
253
251
|
"&&DisassemblyView"
|
|
254
|
-
))
|
|
252
|
+
)),
|
|
255
253
|
},
|
|
256
254
|
precondition: CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE,
|
|
257
255
|
menu: [
|
|
@@ -286,17 +284,16 @@ class ToggleDisassemblyViewSourceCodeAction extends Action2 {
|
|
|
286
284
|
super({
|
|
287
285
|
id: ToggleDisassemblyViewSourceCodeAction.ID,
|
|
288
286
|
title: {
|
|
289
|
-
|
|
287
|
+
...( localize2WithPath(
|
|
290
288
|
'vs/workbench/contrib/debug/browser/debugEditorActions',
|
|
291
289
|
'toggleDisassemblyViewSourceCode',
|
|
292
290
|
"Toggle Source Code in Disassembly View"
|
|
293
291
|
)),
|
|
294
|
-
original: 'Toggle Source Code in Disassembly View',
|
|
295
292
|
mnemonicTitle: ( localizeWithPath(
|
|
296
293
|
'vs/workbench/contrib/debug/browser/debugEditorActions',
|
|
297
294
|
{ key: 'mitogglesource', comment: ['&& denotes a mnemonic'] },
|
|
298
295
|
"&&ToggleSource"
|
|
299
|
-
))
|
|
296
|
+
)),
|
|
300
297
|
},
|
|
301
298
|
f1: true,
|
|
302
299
|
});
|
|
@@ -17,11 +17,11 @@ import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/c
|
|
|
17
17
|
import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
18
18
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
19
19
|
import { editorHoverBackground, asCssVariable, editorHoverBorder, editorHoverForeground } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
|
|
20
|
-
import { renderExpressionValue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
20
|
+
import { renderExpressionValue, AbstractExpressionDataSource } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
21
21
|
import { LinkDetector } from './linkDetector.js';
|
|
22
|
-
import { VariablesRenderer, openContextMenuForVariableTreeElement } from './variablesView.js';
|
|
22
|
+
import { VariablesRenderer, VisualizedVariableRenderer, openContextMenuForVariableTreeElement } from './variablesView.js';
|
|
23
23
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
24
|
-
import { Variable, Expression } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
24
|
+
import { Variable, Expression, VisualizedExpression } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
25
25
|
import { getEvaluatableExpressionAtPosition } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
26
26
|
|
|
27
27
|
var DebugHoverWidget_1;
|
|
@@ -83,9 +83,12 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
83
83
|
'Hold {0} key to switch to editor language hover',
|
|
84
84
|
isMacintosh ? 'Option' : 'Alt'
|
|
85
85
|
));
|
|
86
|
-
const dataSource = (
|
|
86
|
+
const dataSource = this.instantiationService.createInstance(DebugHoverDataSource);
|
|
87
87
|
const linkeDetector = this.instantiationService.createInstance(LinkDetector);
|
|
88
|
-
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, ( new DebugHoverDelegate()), [
|
|
88
|
+
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, ( new DebugHoverDelegate()), [
|
|
89
|
+
this.instantiationService.createInstance(VariablesRenderer, linkeDetector),
|
|
90
|
+
this.instantiationService.createInstance(VisualizedVariableRenderer, linkeDetector),
|
|
91
|
+
], dataSource, {
|
|
89
92
|
accessibilityProvider: ( new DebugHoverAccessibilityProvider()),
|
|
90
93
|
mouseSupport: false,
|
|
91
94
|
horizontalScrolling: true,
|
|
@@ -95,6 +98,7 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
95
98
|
listBackground: editorHoverBackground
|
|
96
99
|
}
|
|
97
100
|
});
|
|
101
|
+
this.toDispose.push(VisualizedVariableRenderer.rendererOnVisualizationRange(this.debugService.getViewModel(), this.tree));
|
|
98
102
|
this.valueContainer = $('.value');
|
|
99
103
|
this.valueContainer.tabIndex = 0;
|
|
100
104
|
this.valueContainer.setAttribute('role', 'tooltip');
|
|
@@ -322,11 +326,11 @@ class DebugHoverAccessibilityProvider {
|
|
|
322
326
|
));
|
|
323
327
|
}
|
|
324
328
|
}
|
|
325
|
-
class DebugHoverDataSource {
|
|
329
|
+
class DebugHoverDataSource extends AbstractExpressionDataSource {
|
|
326
330
|
hasChildren(element) {
|
|
327
331
|
return element.hasChildren;
|
|
328
332
|
}
|
|
329
|
-
|
|
333
|
+
doGetChildren(element) {
|
|
330
334
|
return element.getChildren();
|
|
331
335
|
}
|
|
332
336
|
}
|
|
@@ -335,6 +339,9 @@ class DebugHoverDelegate {
|
|
|
335
339
|
return 18;
|
|
336
340
|
}
|
|
337
341
|
getTemplateId(element) {
|
|
342
|
+
if (element instanceof VisualizedExpression) {
|
|
343
|
+
return VisualizedVariableRenderer.ID;
|
|
344
|
+
}
|
|
338
345
|
return VariablesRenderer.ID;
|
|
339
346
|
}
|
|
340
347
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
-
import { VIEWLET_ID, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
4
|
-
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
5
3
|
import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
5
|
+
import { VIEWLET_ID, IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
6
6
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
|
|
7
|
-
import { NotificationPriority } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
8
7
|
|
|
9
8
|
let DebugProgressContribution = class DebugProgressContribution {
|
|
10
9
|
constructor(debugService, progressService, viewsService) {
|
|
@@ -31,7 +30,6 @@ let DebugProgressContribution = class DebugProgressContribution {
|
|
|
31
30
|
location: 15 ,
|
|
32
31
|
title: progressStartEvent.body.title,
|
|
33
32
|
cancellable: progressStartEvent.body.cancellable,
|
|
34
|
-
priority: NotificationPriority.SILENT,
|
|
35
33
|
source,
|
|
36
34
|
delay: 500
|
|
37
35
|
}, progressStep => {
|
|
@@ -952,8 +952,8 @@ let DebugService = class DebugService {
|
|
|
952
952
|
this.model.setBreakpointsActivated(activated);
|
|
953
953
|
return this.sendAllBreakpoints();
|
|
954
954
|
}
|
|
955
|
-
addFunctionBreakpoint(name, id) {
|
|
956
|
-
this.model.addFunctionBreakpoint(name || '', id);
|
|
955
|
+
addFunctionBreakpoint(name, id, mode) {
|
|
956
|
+
this.model.addFunctionBreakpoint(name || '', id, mode);
|
|
957
957
|
}
|
|
958
958
|
async updateFunctionBreakpoint(id, update) {
|
|
959
959
|
this.model.updateFunctionBreakpoint(id, update);
|
|
@@ -965,8 +965,8 @@ let DebugService = class DebugService {
|
|
|
965
965
|
this.debugStorage.storeBreakpoints(this.model);
|
|
966
966
|
await this.sendFunctionBreakpoints();
|
|
967
967
|
}
|
|
968
|
-
async addDataBreakpoint(
|
|
969
|
-
this.model.addDataBreakpoint(
|
|
968
|
+
async addDataBreakpoint(description, dataId, canPersist, accessTypes, accessType, mode) {
|
|
969
|
+
this.model.addDataBreakpoint({ description, dataId, canPersist, accessTypes, accessType, mode });
|
|
970
970
|
this.debugStorage.storeBreakpoints(this.model);
|
|
971
971
|
await this.sendDataBreakpoints();
|
|
972
972
|
this.debugStorage.storeBreakpoints(this.model);
|
|
@@ -981,8 +981,8 @@ let DebugService = class DebugService {
|
|
|
981
981
|
this.debugStorage.storeBreakpoints(this.model);
|
|
982
982
|
await this.sendDataBreakpoints();
|
|
983
983
|
}
|
|
984
|
-
async addInstructionBreakpoint(
|
|
985
|
-
this.model.addInstructionBreakpoint(
|
|
984
|
+
async addInstructionBreakpoint(opts) {
|
|
985
|
+
this.model.addInstructionBreakpoint(opts);
|
|
986
986
|
this.debugStorage.storeBreakpoints(this.model);
|
|
987
987
|
await this.sendInstructionBreakpoints();
|
|
988
988
|
this.debugStorage.storeBreakpoints(this.model);
|
|
@@ -996,8 +996,8 @@ let DebugService = class DebugService {
|
|
|
996
996
|
this.model.setExceptionBreakpointFallbackSession(sessionId);
|
|
997
997
|
this.debugStorage.storeBreakpoints(this.model);
|
|
998
998
|
}
|
|
999
|
-
setExceptionBreakpointsForSession(session,
|
|
1000
|
-
this.model.setExceptionBreakpointsForSession(session.getId(),
|
|
999
|
+
setExceptionBreakpointsForSession(session, filters) {
|
|
1000
|
+
this.model.setExceptionBreakpointsForSession(session.getId(), filters);
|
|
1001
1001
|
this.debugStorage.storeBreakpoints(this.model);
|
|
1002
1002
|
}
|
|
1003
1003
|
async setExceptionBreakpointCondition(exceptionBreakpoint, condition) {
|
|
@@ -259,6 +259,7 @@ let DebugSession = class DebugSession {
|
|
|
259
259
|
this.initialized = true;
|
|
260
260
|
this._onDidChangeState.fire();
|
|
261
261
|
this.debugService.setExceptionBreakpointsForSession(this, (this.raw && this.raw.capabilities.exceptionBreakpointFilters) || []);
|
|
262
|
+
this.debugService.getModel().registerBreakpointModes(this.configuration.type, this.raw.capabilities.breakpointModes || []);
|
|
262
263
|
}
|
|
263
264
|
catch (err) {
|
|
264
265
|
this.initialized = true;
|
|
@@ -347,9 +348,7 @@ let DebugSession = class DebugSession {
|
|
|
347
348
|
const response = await this.raw.setBreakpoints({
|
|
348
349
|
source: rawSource,
|
|
349
350
|
lines: ( breakpointsToSend.map(bp => bp.sessionAgnosticData.lineNumber)),
|
|
350
|
-
breakpoints: ( breakpointsToSend.map(
|
|
351
|
-
bp => ({ line: bp.sessionAgnosticData.lineNumber, column: bp.sessionAgnosticData.column, condition: bp.condition, hitCondition: bp.hitCondition, logMessage: bp.logMessage })
|
|
352
|
-
)),
|
|
351
|
+
breakpoints: ( breakpointsToSend.map(bp => bp.toDAP())),
|
|
353
352
|
sourceModified
|
|
354
353
|
});
|
|
355
354
|
if (response && response.body) {
|
|
@@ -365,7 +364,7 @@ let DebugSession = class DebugSession {
|
|
|
365
364
|
throw new Error(localizeWithPath('vs/workbench/contrib/debug/browser/debugSession', 'noDebugAdapter', "No debugger available, can not send '{0}'", 'function breakpoints'));
|
|
366
365
|
}
|
|
367
366
|
if (this.raw.readyForBreakpoints) {
|
|
368
|
-
const response = await this.raw.setFunctionBreakpoints({ breakpoints: fbpts });
|
|
367
|
+
const response = await this.raw.setFunctionBreakpoints({ breakpoints: ( fbpts.map(bp => bp.toDAP())) });
|
|
369
368
|
if (response && response.body) {
|
|
370
369
|
const data = ( new Map());
|
|
371
370
|
for (let i = 0; i < fbpts.length; i++) {
|
|
@@ -414,7 +413,7 @@ let DebugSession = class DebugSession {
|
|
|
414
413
|
throw new Error(localizeWithPath('vs/workbench/contrib/debug/browser/debugSession', 'noDebugAdapter', "No debugger available, can not send '{0}'", 'data breakpoints'));
|
|
415
414
|
}
|
|
416
415
|
if (this.raw.readyForBreakpoints) {
|
|
417
|
-
const response = await this.raw.setDataBreakpoints({ breakpoints: dataBreakpoints });
|
|
416
|
+
const response = await this.raw.setDataBreakpoints({ breakpoints: ( dataBreakpoints.map(bp => bp.toDAP())) });
|
|
418
417
|
if (response && response.body) {
|
|
419
418
|
const data = ( new Map());
|
|
420
419
|
for (let i = 0; i < dataBreakpoints.length; i++) {
|
|
@@ -429,7 +428,7 @@ let DebugSession = class DebugSession {
|
|
|
429
428
|
throw new Error(localizeWithPath('vs/workbench/contrib/debug/browser/debugSession', 'noDebugAdapter', "No debugger available, can not send '{0}'", 'instruction breakpoints'));
|
|
430
429
|
}
|
|
431
430
|
if (this.raw.readyForBreakpoints) {
|
|
432
|
-
const response = await this.raw.setInstructionBreakpoints({ breakpoints: ( instructionBreakpoints.map(ib => ib.
|
|
431
|
+
const response = await this.raw.setInstructionBreakpoints({ breakpoints: ( instructionBreakpoints.map(ib => ib.toDAP())) });
|
|
433
432
|
if (response && response.body) {
|
|
434
433
|
const data = ( new Map());
|
|
435
434
|
for (let i = 0; i < instructionBreakpoints.length; i++) {
|