@codingame/monaco-vscode-debug-service-override 1.85.0 → 1.85.2
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 +4 -1
- package/package.json +3 -3
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +73 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +141 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +9 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +0 -857
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +0 -412
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +0 -1593
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +0 -180
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +0 -1487
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +0 -127
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +0 -31
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +0 -207
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +0 -13
|
@@ -1,1593 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
3
|
-
import { Gesture } from 'monaco-editor/esm/vs/base/browser/touch.js';
|
|
4
|
-
import { ActionBar } from 'monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js';
|
|
5
|
-
import { IconLabel } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js';
|
|
6
|
-
import { InputBox } from 'monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js';
|
|
7
|
-
import { Action } from 'monaco-editor/esm/vs/base/common/actions.js';
|
|
8
|
-
import { equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
9
|
-
import { RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
10
|
-
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
11
|
-
import { MarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
|
|
12
|
-
import { dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
13
|
-
import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
14
|
-
import { isCodeEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
|
|
15
|
-
import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
|
|
16
|
-
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
17
|
-
import { createAndFillInActionBarActions, createAndFillInContextMenuActions } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
|
|
18
|
-
import { registerAction2, Action2, MenuId, IMenuService } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
19
|
-
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
20
|
-
import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
21
|
-
import { IContextMenuService, IContextViewService } from 'monaco-editor/esm/vs/platform/contextview/browser/contextView.js';
|
|
22
|
-
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
23
|
-
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
24
|
-
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
25
|
-
import { WorkbenchList } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
|
|
26
|
-
import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
27
|
-
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
28
|
-
import { defaultInputBoxStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
|
|
29
|
-
import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
30
|
-
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
31
|
-
import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
32
|
-
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
33
|
-
import { dataBreakpoint, functionBreakpoint, logBreakpoint, breakpoint, debugBreakpointUnsupported, conditionalBreakpoint, watchExpressionsAddFuncBreakpoint, breakpointsActivate, breakpointsRemoveAll } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
34
|
-
import { BREAKPOINTS_VIEW_ID, CONTEXT_DEBUGGERS_AVAILABLE, IDebugService, CONTEXT_BREAKPOINT_ITEM_TYPE, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_IN_DEBUG_MODE, CONTEXT_BREAKPOINT_SUPPORTS_CONDITION, BREAKPOINT_EDITOR_CONTRIBUTION_ID, CONTEXT_BREAKPOINT_INPUT_FOCUSED, CONTEXT_BREAKPOINTS_FOCUSED, DebuggerString, DEBUG_SCHEME } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
35
|
-
import { DataBreakpoint, FunctionBreakpoint, InstructionBreakpoint, Breakpoint, ExceptionBreakpoint } from '../common/debugModel.js';
|
|
36
|
-
import { DisassemblyViewInput } from '../common/disassemblyViewInput.js';
|
|
37
|
-
import { IEditorService, SIDE_GROUP, ACTIVE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
38
|
-
import { IHoverService } from 'vscode/vscode/vs/workbench/services/hover/browser/hover';
|
|
39
|
-
|
|
40
|
-
var BreakpointsRenderer_1, FunctionBreakpointsRenderer_1, DataBreakpointsRenderer_1, InstructionBreakpointsRenderer_1;
|
|
41
|
-
const $ = dom.$;
|
|
42
|
-
function createCheckbox(disposables) {
|
|
43
|
-
const checkbox = $('input');
|
|
44
|
-
checkbox.type = 'checkbox';
|
|
45
|
-
checkbox.tabIndex = -1;
|
|
46
|
-
disposables.push(Gesture.ignoreTarget(checkbox));
|
|
47
|
-
return checkbox;
|
|
48
|
-
}
|
|
49
|
-
const MAX_VISIBLE_BREAKPOINTS = 9;
|
|
50
|
-
function getExpandedBodySize(model, sessionId, countLimit) {
|
|
51
|
-
const length = model.getBreakpoints().length + model.getExceptionBreakpointsForSession(sessionId).length + model.getFunctionBreakpoints().length + model.getDataBreakpoints().length + model.getInstructionBreakpoints().length;
|
|
52
|
-
return Math.min(countLimit, length) * 22;
|
|
53
|
-
}
|
|
54
|
-
let BreakpointsView = class BreakpointsView extends ViewPane {
|
|
55
|
-
constructor(options, contextMenuService, debugService, keybindingService, instantiationService, themeService, editorService, contextViewService, configurationService, viewDescriptorService, contextKeyService, openerService, telemetryService, labelService, menuService, hoverService, languageService) {
|
|
56
|
-
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
57
|
-
this.debugService = debugService;
|
|
58
|
-
this.editorService = editorService;
|
|
59
|
-
this.contextViewService = contextViewService;
|
|
60
|
-
this.labelService = labelService;
|
|
61
|
-
this.hoverService = hoverService;
|
|
62
|
-
this.languageService = languageService;
|
|
63
|
-
this.needsRefresh = false;
|
|
64
|
-
this.needsStateChange = false;
|
|
65
|
-
this.ignoreLayout = false;
|
|
66
|
-
this.autoFocusedIndex = -1;
|
|
67
|
-
this.menu = menuService.createMenu(MenuId.DebugBreakpointsContext, contextKeyService);
|
|
68
|
-
this._register(this.menu);
|
|
69
|
-
this.breakpointItemType = CONTEXT_BREAKPOINT_ITEM_TYPE.bindTo(contextKeyService);
|
|
70
|
-
this.breakpointSupportsCondition = CONTEXT_BREAKPOINT_SUPPORTS_CONDITION.bindTo(contextKeyService);
|
|
71
|
-
this.breakpointInputFocused = CONTEXT_BREAKPOINT_INPUT_FOCUSED.bindTo(contextKeyService);
|
|
72
|
-
this._register(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
|
|
73
|
-
this._register(this.debugService.getViewModel().onDidFocusSession(() => this.onBreakpointsChange()));
|
|
74
|
-
this._register(this.debugService.onDidChangeState(() => this.onStateChange()));
|
|
75
|
-
this.hintDelayer = this._register(( new RunOnceScheduler(() => this.updateBreakpointsHint(true), 4000)));
|
|
76
|
-
}
|
|
77
|
-
renderBody(container) {
|
|
78
|
-
super.renderBody(container);
|
|
79
|
-
this.element.classList.add('debug-pane');
|
|
80
|
-
container.classList.add('debug-breakpoints');
|
|
81
|
-
const delegate = ( new BreakpointsDelegate(this));
|
|
82
|
-
this.list = this.instantiationService.createInstance(WorkbenchList, 'Breakpoints', container, delegate, [
|
|
83
|
-
this.instantiationService.createInstance(BreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
|
|
84
|
-
( new ExceptionBreakpointsRenderer(
|
|
85
|
-
this.menu,
|
|
86
|
-
this.breakpointSupportsCondition,
|
|
87
|
-
this.breakpointItemType,
|
|
88
|
-
this.debugService
|
|
89
|
-
)),
|
|
90
|
-
( new ExceptionBreakpointInputRenderer(this, this.debugService, this.contextViewService)),
|
|
91
|
-
this.instantiationService.createInstance(FunctionBreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
|
|
92
|
-
( new FunctionBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.labelService)),
|
|
93
|
-
this.instantiationService.createInstance(DataBreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
|
|
94
|
-
( new DataBreakpointInputRenderer(this, this.debugService, this.contextViewService, this.labelService)),
|
|
95
|
-
this.instantiationService.createInstance(InstructionBreakpointsRenderer),
|
|
96
|
-
], {
|
|
97
|
-
identityProvider: { getId: (element) => element.getId() },
|
|
98
|
-
multipleSelectionSupport: false,
|
|
99
|
-
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e) => e },
|
|
100
|
-
accessibilityProvider: ( new BreakpointsAccessibilityProvider(this.debugService, this.labelService)),
|
|
101
|
-
overrideStyles: {
|
|
102
|
-
listBackground: this.getBackgroundColor()
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService);
|
|
106
|
-
this._register(this.list.onContextMenu(this.onListContextMenu, this));
|
|
107
|
-
this.list.onMouseMiddleClick(async ({ element }) => {
|
|
108
|
-
if (element instanceof Breakpoint) {
|
|
109
|
-
await this.debugService.removeBreakpoints(element.getId());
|
|
110
|
-
}
|
|
111
|
-
else if (element instanceof FunctionBreakpoint) {
|
|
112
|
-
await this.debugService.removeFunctionBreakpoints(element.getId());
|
|
113
|
-
}
|
|
114
|
-
else if (element instanceof DataBreakpoint) {
|
|
115
|
-
await this.debugService.removeDataBreakpoints(element.getId());
|
|
116
|
-
}
|
|
117
|
-
else if (element instanceof InstructionBreakpoint) {
|
|
118
|
-
await this.debugService.removeInstructionBreakpoints(element.instructionReference, element.offset);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
this._register(this.list.onDidOpen(async (e) => {
|
|
122
|
-
if (!e.element) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
if (dom.isMouseEvent(e.browserEvent) && e.browserEvent.button === 1) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (e.element instanceof Breakpoint) {
|
|
129
|
-
openBreakpointSource(e.element, e.sideBySide, e.editorOptions.preserveFocus || false, e.editorOptions.pinned || !e.editorOptions.preserveFocus, this.debugService, this.editorService);
|
|
130
|
-
}
|
|
131
|
-
if (e.element instanceof InstructionBreakpoint) {
|
|
132
|
-
const disassemblyView = await this.editorService.openEditor(DisassemblyViewInput.instance);
|
|
133
|
-
disassemblyView.goToInstructionAndOffset(e.element.instructionReference, e.element.offset, dom.isMouseEvent(e.browserEvent) && e.browserEvent.detail === 2);
|
|
134
|
-
}
|
|
135
|
-
if (dom.isMouseEvent(e.browserEvent) && e.browserEvent.detail === 2 && e.element instanceof FunctionBreakpoint && e.element !== this.inputBoxData?.breakpoint) {
|
|
136
|
-
this.renderInputBox({ breakpoint: e.element, type: 'name' });
|
|
137
|
-
}
|
|
138
|
-
}));
|
|
139
|
-
this.list.splice(0, this.list.length, this.elements);
|
|
140
|
-
this._register(this.onDidChangeBodyVisibility(visible => {
|
|
141
|
-
if (visible) {
|
|
142
|
-
if (this.needsRefresh) {
|
|
143
|
-
this.onBreakpointsChange();
|
|
144
|
-
}
|
|
145
|
-
if (this.needsStateChange) {
|
|
146
|
-
this.onStateChange();
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}));
|
|
150
|
-
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));
|
|
151
|
-
this._register(containerModel.onDidChangeAllViewDescriptors(() => {
|
|
152
|
-
this.updateSize();
|
|
153
|
-
}));
|
|
154
|
-
}
|
|
155
|
-
renderHeaderTitle(container, title) {
|
|
156
|
-
super.renderHeaderTitle(container, title);
|
|
157
|
-
const iconLabelContainer = dom.append(container, $('span.breakpoint-warning'));
|
|
158
|
-
this.hintContainer = this._register(( new IconLabel(iconLabelContainer, {
|
|
159
|
-
supportIcons: true, hoverDelegate: {
|
|
160
|
-
showHover: (options, focus) => this.hoverService.showHover({ content: options.content, target: this.hintContainer.element }, focus),
|
|
161
|
-
delay: this.configurationService.getValue('workbench.hover.delay')
|
|
162
|
-
}
|
|
163
|
-
})));
|
|
164
|
-
dom.hide(this.hintContainer.element);
|
|
165
|
-
}
|
|
166
|
-
focus() {
|
|
167
|
-
super.focus();
|
|
168
|
-
this.list?.domFocus();
|
|
169
|
-
}
|
|
170
|
-
renderInputBox(data) {
|
|
171
|
-
this._inputBoxData = data;
|
|
172
|
-
this.onBreakpointsChange();
|
|
173
|
-
this._inputBoxData = undefined;
|
|
174
|
-
}
|
|
175
|
-
get inputBoxData() {
|
|
176
|
-
return this._inputBoxData;
|
|
177
|
-
}
|
|
178
|
-
layoutBody(height, width) {
|
|
179
|
-
if (this.ignoreLayout) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
super.layoutBody(height, width);
|
|
183
|
-
this.list?.layout(height, width);
|
|
184
|
-
try {
|
|
185
|
-
this.ignoreLayout = true;
|
|
186
|
-
this.updateSize();
|
|
187
|
-
}
|
|
188
|
-
finally {
|
|
189
|
-
this.ignoreLayout = false;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
onListContextMenu(e) {
|
|
193
|
-
const element = e.element;
|
|
194
|
-
const type = element instanceof Breakpoint ? 'breakpoint' : element instanceof ExceptionBreakpoint ? 'exceptionBreakpoint' :
|
|
195
|
-
element instanceof FunctionBreakpoint ? 'functionBreakpoint' : element instanceof DataBreakpoint ? 'dataBreakpoint' :
|
|
196
|
-
element instanceof InstructionBreakpoint ? 'instructionBreakpoint' : undefined;
|
|
197
|
-
this.breakpointItemType.set(type);
|
|
198
|
-
const session = this.debugService.getViewModel().focusedSession;
|
|
199
|
-
const conditionSupported = element instanceof ExceptionBreakpoint ? element.supportsCondition : (!session || !!session.capabilities.supportsConditionalBreakpoints);
|
|
200
|
-
this.breakpointSupportsCondition.set(conditionSupported);
|
|
201
|
-
const secondary = [];
|
|
202
|
-
createAndFillInContextMenuActions(this.menu, { arg: e.element, shouldForwardArgs: false }, { primary: [], secondary }, 'inline');
|
|
203
|
-
this.contextMenuService.showContextMenu({
|
|
204
|
-
getAnchor: () => e.anchor,
|
|
205
|
-
getActions: () => secondary,
|
|
206
|
-
getActionsContext: () => element
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
updateSize() {
|
|
210
|
-
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));
|
|
211
|
-
const sessionId = this.debugService.getViewModel().focusedSession?.getId();
|
|
212
|
-
this.minimumBodySize = this.orientation === 0 ? getExpandedBodySize(this.debugService.getModel(), sessionId, MAX_VISIBLE_BREAKPOINTS) : 170;
|
|
213
|
-
this.maximumBodySize = this.orientation === 0 && containerModel.visibleViewDescriptors.length > 1 ? getExpandedBodySize(this.debugService.getModel(), sessionId, Number.POSITIVE_INFINITY) : Number.POSITIVE_INFINITY;
|
|
214
|
-
}
|
|
215
|
-
updateBreakpointsHint(delayed = false) {
|
|
216
|
-
if (!this.hintContainer) {
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
const currentType = this.debugService.getViewModel().focusedSession?.configuration.type;
|
|
220
|
-
const dbg = currentType ? this.debugService.getAdapterManager().getDebugger(currentType) : undefined;
|
|
221
|
-
const message = dbg?.strings?.[DebuggerString.UnverifiedBreakpoints];
|
|
222
|
-
const debuggerHasUnverifiedBps = message && this.debugService.getModel().getBreakpoints().filter(bp => {
|
|
223
|
-
if (bp.verified || !bp.enabled) {
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
226
|
-
const langId = this.languageService.guessLanguageIdByFilepathOrFirstLine(bp.uri);
|
|
227
|
-
return langId && dbg.interestedInLanguage(langId);
|
|
228
|
-
});
|
|
229
|
-
if (message && debuggerHasUnverifiedBps?.length && this.debugService.getModel().areBreakpointsActivated()) {
|
|
230
|
-
if (delayed) {
|
|
231
|
-
const mdown = ( new MarkdownString(undefined, { isTrusted: true })).appendMarkdown(message);
|
|
232
|
-
this.hintContainer.setLabel('$(warning)', undefined, { title: { markdown: mdown, markdownNotSupportedFallback: message } });
|
|
233
|
-
dom.show(this.hintContainer.element);
|
|
234
|
-
}
|
|
235
|
-
else {
|
|
236
|
-
this.hintDelayer.schedule();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
dom.hide(this.hintContainer.element);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
onBreakpointsChange() {
|
|
244
|
-
if (this.isBodyVisible()) {
|
|
245
|
-
this.updateSize();
|
|
246
|
-
if (this.list) {
|
|
247
|
-
const lastFocusIndex = this.list.getFocus()[0];
|
|
248
|
-
const needsRefocus = lastFocusIndex && !this.elements.includes(this.list.element(lastFocusIndex));
|
|
249
|
-
this.list.splice(0, this.list.length, this.elements);
|
|
250
|
-
this.needsRefresh = false;
|
|
251
|
-
if (needsRefocus) {
|
|
252
|
-
this.list.focusNth(Math.min(lastFocusIndex, this.list.length - 1));
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
this.updateBreakpointsHint();
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
this.needsRefresh = true;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
onStateChange() {
|
|
262
|
-
if (this.isBodyVisible()) {
|
|
263
|
-
this.needsStateChange = false;
|
|
264
|
-
const thread = this.debugService.getViewModel().focusedThread;
|
|
265
|
-
let found = false;
|
|
266
|
-
if (thread && thread.stoppedDetails && thread.stoppedDetails.hitBreakpointIds && thread.stoppedDetails.hitBreakpointIds.length > 0) {
|
|
267
|
-
const hitBreakpointIds = thread.stoppedDetails.hitBreakpointIds;
|
|
268
|
-
const elements = this.elements;
|
|
269
|
-
const index = elements.findIndex(e => {
|
|
270
|
-
const id = e.getIdFromAdapter(thread.session.getId());
|
|
271
|
-
return typeof id === 'number' && hitBreakpointIds.indexOf(id) !== -1;
|
|
272
|
-
});
|
|
273
|
-
if (index >= 0) {
|
|
274
|
-
this.list.setFocus([index]);
|
|
275
|
-
this.list.setSelection([index]);
|
|
276
|
-
found = true;
|
|
277
|
-
this.autoFocusedIndex = index;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
if (!found) {
|
|
281
|
-
const focus = this.list.getFocus();
|
|
282
|
-
const selection = this.list.getSelection();
|
|
283
|
-
if (this.autoFocusedIndex >= 0 && equals(focus, selection) && focus.indexOf(this.autoFocusedIndex) >= 0) {
|
|
284
|
-
this.list.setFocus([]);
|
|
285
|
-
this.list.setSelection([]);
|
|
286
|
-
}
|
|
287
|
-
this.autoFocusedIndex = -1;
|
|
288
|
-
}
|
|
289
|
-
this.updateBreakpointsHint();
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
this.needsStateChange = true;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
get elements() {
|
|
296
|
-
const model = this.debugService.getModel();
|
|
297
|
-
const sessionId = this.debugService.getViewModel().focusedSession?.getId();
|
|
298
|
-
const elements = model.getExceptionBreakpointsForSession(sessionId).concat(model.getFunctionBreakpoints()).concat(model.getDataBreakpoints()).concat(model.getBreakpoints()).concat(model.getInstructionBreakpoints());
|
|
299
|
-
return elements;
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
BreakpointsView = ( __decorate([
|
|
303
|
-
( __param(1, IContextMenuService)),
|
|
304
|
-
( __param(2, IDebugService)),
|
|
305
|
-
( __param(3, IKeybindingService)),
|
|
306
|
-
( __param(4, IInstantiationService)),
|
|
307
|
-
( __param(5, IThemeService)),
|
|
308
|
-
( __param(6, IEditorService)),
|
|
309
|
-
( __param(7, IContextViewService)),
|
|
310
|
-
( __param(8, IConfigurationService)),
|
|
311
|
-
( __param(9, IViewDescriptorService)),
|
|
312
|
-
( __param(10, IContextKeyService)),
|
|
313
|
-
( __param(11, IOpenerService)),
|
|
314
|
-
( __param(12, ITelemetryService)),
|
|
315
|
-
( __param(13, ILabelService)),
|
|
316
|
-
( __param(14, IMenuService)),
|
|
317
|
-
( __param(15, IHoverService)),
|
|
318
|
-
( __param(16, ILanguageService))
|
|
319
|
-
], BreakpointsView));
|
|
320
|
-
class BreakpointsDelegate {
|
|
321
|
-
constructor(view) {
|
|
322
|
-
this.view = view;
|
|
323
|
-
}
|
|
324
|
-
getHeight(_element) {
|
|
325
|
-
return 22;
|
|
326
|
-
}
|
|
327
|
-
getTemplateId(element) {
|
|
328
|
-
if (element instanceof Breakpoint) {
|
|
329
|
-
return BreakpointsRenderer.ID;
|
|
330
|
-
}
|
|
331
|
-
if (element instanceof FunctionBreakpoint) {
|
|
332
|
-
const inputBoxBreakpoint = this.view.inputBoxData?.breakpoint;
|
|
333
|
-
if (!element.name || (inputBoxBreakpoint && inputBoxBreakpoint.getId() === element.getId())) {
|
|
334
|
-
return FunctionBreakpointInputRenderer.ID;
|
|
335
|
-
}
|
|
336
|
-
return FunctionBreakpointsRenderer.ID;
|
|
337
|
-
}
|
|
338
|
-
if (element instanceof ExceptionBreakpoint) {
|
|
339
|
-
const inputBoxBreakpoint = this.view.inputBoxData?.breakpoint;
|
|
340
|
-
if (inputBoxBreakpoint && inputBoxBreakpoint.getId() === element.getId()) {
|
|
341
|
-
return ExceptionBreakpointInputRenderer.ID;
|
|
342
|
-
}
|
|
343
|
-
return ExceptionBreakpointsRenderer.ID;
|
|
344
|
-
}
|
|
345
|
-
if (element instanceof DataBreakpoint) {
|
|
346
|
-
const inputBoxBreakpoint = this.view.inputBoxData?.breakpoint;
|
|
347
|
-
if (inputBoxBreakpoint && inputBoxBreakpoint.getId() === element.getId()) {
|
|
348
|
-
return DataBreakpointInputRenderer.ID;
|
|
349
|
-
}
|
|
350
|
-
return DataBreakpointsRenderer.ID;
|
|
351
|
-
}
|
|
352
|
-
if (element instanceof InstructionBreakpoint) {
|
|
353
|
-
return InstructionBreakpointsRenderer.ID;
|
|
354
|
-
}
|
|
355
|
-
return '';
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
const breakpointIdToActionBarDomeNode = ( new Map());
|
|
359
|
-
let BreakpointsRenderer = class BreakpointsRenderer {
|
|
360
|
-
static { BreakpointsRenderer_1 = this; }
|
|
361
|
-
constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService, labelService) {
|
|
362
|
-
this.menu = menu;
|
|
363
|
-
this.breakpointSupportsCondition = breakpointSupportsCondition;
|
|
364
|
-
this.breakpointItemType = breakpointItemType;
|
|
365
|
-
this.debugService = debugService;
|
|
366
|
-
this.labelService = labelService;
|
|
367
|
-
}
|
|
368
|
-
static { this.ID = 'breakpoints'; }
|
|
369
|
-
get templateId() {
|
|
370
|
-
return BreakpointsRenderer_1.ID;
|
|
371
|
-
}
|
|
372
|
-
renderTemplate(container) {
|
|
373
|
-
const data = Object.create(null);
|
|
374
|
-
data.toDispose = [];
|
|
375
|
-
data.breakpoint = dom.append(container, $('.breakpoint'));
|
|
376
|
-
data.icon = $('.icon');
|
|
377
|
-
data.checkbox = createCheckbox(data.toDispose);
|
|
378
|
-
data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
|
|
379
|
-
this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
|
|
380
|
-
}));
|
|
381
|
-
dom.append(data.breakpoint, data.icon);
|
|
382
|
-
dom.append(data.breakpoint, data.checkbox);
|
|
383
|
-
data.name = dom.append(data.breakpoint, $('span.name'));
|
|
384
|
-
data.filePath = dom.append(data.breakpoint, $('span.file-path'));
|
|
385
|
-
data.actionBar = ( new ActionBar(data.breakpoint));
|
|
386
|
-
data.toDispose.push(data.actionBar);
|
|
387
|
-
const lineNumberContainer = dom.append(data.breakpoint, $('.line-number-container'));
|
|
388
|
-
data.lineNumber = dom.append(lineNumberContainer, $('span.line-number.monaco-count-badge'));
|
|
389
|
-
return data;
|
|
390
|
-
}
|
|
391
|
-
renderElement(breakpoint, index, data) {
|
|
392
|
-
data.context = breakpoint;
|
|
393
|
-
data.breakpoint.classList.toggle('disabled', !this.debugService.getModel().areBreakpointsActivated());
|
|
394
|
-
data.name.textContent = resources.basenameOrAuthority(breakpoint.uri);
|
|
395
|
-
data.lineNumber.textContent = ( breakpoint.lineNumber.toString());
|
|
396
|
-
if (breakpoint.column) {
|
|
397
|
-
data.lineNumber.textContent += `:${breakpoint.column}`;
|
|
398
|
-
}
|
|
399
|
-
data.filePath.textContent = this.labelService.getUriLabel(resources.dirname(breakpoint.uri), { relative: true });
|
|
400
|
-
data.checkbox.checked = breakpoint.enabled;
|
|
401
|
-
const { message, icon } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), breakpoint, this.labelService);
|
|
402
|
-
data.icon.className = ThemeIcon.asClassName(icon);
|
|
403
|
-
data.breakpoint.title = breakpoint.message || message || '';
|
|
404
|
-
const debugActive = this.debugService.state === 3 || this.debugService.state === 2 ;
|
|
405
|
-
if (debugActive && !breakpoint.verified) {
|
|
406
|
-
data.breakpoint.classList.add('disabled');
|
|
407
|
-
}
|
|
408
|
-
const primary = [];
|
|
409
|
-
const session = this.debugService.getViewModel().focusedSession;
|
|
410
|
-
this.breakpointSupportsCondition.set(!session || !!session.capabilities.supportsConditionalBreakpoints);
|
|
411
|
-
this.breakpointItemType.set('breakpoint');
|
|
412
|
-
createAndFillInActionBarActions(this.menu, { arg: breakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
|
|
413
|
-
data.actionBar.clear();
|
|
414
|
-
data.actionBar.push(primary, { icon: true, label: false });
|
|
415
|
-
breakpointIdToActionBarDomeNode.set(breakpoint.getId(), data.actionBar.domNode);
|
|
416
|
-
}
|
|
417
|
-
disposeTemplate(templateData) {
|
|
418
|
-
dispose(templateData.toDispose);
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
BreakpointsRenderer = BreakpointsRenderer_1 = ( __decorate([
|
|
422
|
-
( __param(3, IDebugService)),
|
|
423
|
-
( __param(4, ILabelService))
|
|
424
|
-
], BreakpointsRenderer));
|
|
425
|
-
class ExceptionBreakpointsRenderer {
|
|
426
|
-
constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService) {
|
|
427
|
-
this.menu = menu;
|
|
428
|
-
this.breakpointSupportsCondition = breakpointSupportsCondition;
|
|
429
|
-
this.breakpointItemType = breakpointItemType;
|
|
430
|
-
this.debugService = debugService;
|
|
431
|
-
}
|
|
432
|
-
static { this.ID = 'exceptionbreakpoints'; }
|
|
433
|
-
get templateId() {
|
|
434
|
-
return ExceptionBreakpointsRenderer.ID;
|
|
435
|
-
}
|
|
436
|
-
renderTemplate(container) {
|
|
437
|
-
const data = Object.create(null);
|
|
438
|
-
data.toDispose = [];
|
|
439
|
-
data.breakpoint = dom.append(container, $('.breakpoint'));
|
|
440
|
-
data.checkbox = createCheckbox(data.toDispose);
|
|
441
|
-
data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
|
|
442
|
-
this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
|
|
443
|
-
}));
|
|
444
|
-
dom.append(data.breakpoint, data.checkbox);
|
|
445
|
-
data.name = dom.append(data.breakpoint, $('span.name'));
|
|
446
|
-
data.condition = dom.append(data.breakpoint, $('span.condition'));
|
|
447
|
-
data.breakpoint.classList.add('exception');
|
|
448
|
-
data.actionBar = ( new ActionBar(data.breakpoint));
|
|
449
|
-
data.toDispose.push(data.actionBar);
|
|
450
|
-
return data;
|
|
451
|
-
}
|
|
452
|
-
renderElement(exceptionBreakpoint, index, data) {
|
|
453
|
-
data.context = exceptionBreakpoint;
|
|
454
|
-
data.name.textContent = exceptionBreakpoint.label || `${exceptionBreakpoint.filter} exceptions`;
|
|
455
|
-
data.breakpoint.title = exceptionBreakpoint.verified ? (exceptionBreakpoint.description || data.name.textContent) : exceptionBreakpoint.message || ( localizeWithPath(
|
|
456
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
457
|
-
'unverifiedExceptionBreakpoint',
|
|
458
|
-
"Unverified Exception Breakpoint"
|
|
459
|
-
));
|
|
460
|
-
data.breakpoint.classList.toggle('disabled', !exceptionBreakpoint.verified);
|
|
461
|
-
data.checkbox.checked = exceptionBreakpoint.enabled;
|
|
462
|
-
data.condition.textContent = exceptionBreakpoint.condition || '';
|
|
463
|
-
data.condition.title = ( localizeWithPath(
|
|
464
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
465
|
-
'expressionCondition',
|
|
466
|
-
"Expression condition: {0}",
|
|
467
|
-
exceptionBreakpoint.condition
|
|
468
|
-
));
|
|
469
|
-
const primary = [];
|
|
470
|
-
this.breakpointSupportsCondition.set(exceptionBreakpoint.supportsCondition);
|
|
471
|
-
this.breakpointItemType.set('exceptionBreakpoint');
|
|
472
|
-
createAndFillInActionBarActions(this.menu, { arg: exceptionBreakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
|
|
473
|
-
data.actionBar.clear();
|
|
474
|
-
data.actionBar.push(primary, { icon: true, label: false });
|
|
475
|
-
breakpointIdToActionBarDomeNode.set(exceptionBreakpoint.getId(), data.actionBar.domNode);
|
|
476
|
-
}
|
|
477
|
-
disposeTemplate(templateData) {
|
|
478
|
-
dispose(templateData.toDispose);
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
let FunctionBreakpointsRenderer = class FunctionBreakpointsRenderer {
|
|
482
|
-
static { FunctionBreakpointsRenderer_1 = this; }
|
|
483
|
-
constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService, labelService) {
|
|
484
|
-
this.menu = menu;
|
|
485
|
-
this.breakpointSupportsCondition = breakpointSupportsCondition;
|
|
486
|
-
this.breakpointItemType = breakpointItemType;
|
|
487
|
-
this.debugService = debugService;
|
|
488
|
-
this.labelService = labelService;
|
|
489
|
-
}
|
|
490
|
-
static { this.ID = 'functionbreakpoints'; }
|
|
491
|
-
get templateId() {
|
|
492
|
-
return FunctionBreakpointsRenderer_1.ID;
|
|
493
|
-
}
|
|
494
|
-
renderTemplate(container) {
|
|
495
|
-
const data = Object.create(null);
|
|
496
|
-
data.toDispose = [];
|
|
497
|
-
data.breakpoint = dom.append(container, $('.breakpoint'));
|
|
498
|
-
data.icon = $('.icon');
|
|
499
|
-
data.checkbox = createCheckbox(data.toDispose);
|
|
500
|
-
data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
|
|
501
|
-
this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
|
|
502
|
-
}));
|
|
503
|
-
dom.append(data.breakpoint, data.icon);
|
|
504
|
-
dom.append(data.breakpoint, data.checkbox);
|
|
505
|
-
data.name = dom.append(data.breakpoint, $('span.name'));
|
|
506
|
-
data.condition = dom.append(data.breakpoint, $('span.condition'));
|
|
507
|
-
data.actionBar = ( new ActionBar(data.breakpoint));
|
|
508
|
-
data.toDispose.push(data.actionBar);
|
|
509
|
-
return data;
|
|
510
|
-
}
|
|
511
|
-
renderElement(functionBreakpoint, _index, data) {
|
|
512
|
-
data.context = functionBreakpoint;
|
|
513
|
-
data.name.textContent = functionBreakpoint.name;
|
|
514
|
-
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), functionBreakpoint, this.labelService);
|
|
515
|
-
data.icon.className = ThemeIcon.asClassName(icon);
|
|
516
|
-
data.icon.title = message ? message : '';
|
|
517
|
-
data.checkbox.checked = functionBreakpoint.enabled;
|
|
518
|
-
data.breakpoint.title = message ? message : '';
|
|
519
|
-
if (functionBreakpoint.condition && functionBreakpoint.hitCondition) {
|
|
520
|
-
data.condition.textContent = ( localizeWithPath(
|
|
521
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
522
|
-
'expressionAndHitCount',
|
|
523
|
-
"Condition: {0} | Hit Count: {1}",
|
|
524
|
-
functionBreakpoint.condition,
|
|
525
|
-
functionBreakpoint.hitCondition
|
|
526
|
-
));
|
|
527
|
-
}
|
|
528
|
-
else {
|
|
529
|
-
data.condition.textContent = functionBreakpoint.condition || functionBreakpoint.hitCondition || '';
|
|
530
|
-
}
|
|
531
|
-
const session = this.debugService.getViewModel().focusedSession;
|
|
532
|
-
data.breakpoint.classList.toggle('disabled', (session && !session.capabilities.supportsFunctionBreakpoints) || !this.debugService.getModel().areBreakpointsActivated());
|
|
533
|
-
if (session && !session.capabilities.supportsFunctionBreakpoints) {
|
|
534
|
-
data.breakpoint.title = ( localizeWithPath(
|
|
535
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
536
|
-
'functionBreakpointsNotSupported',
|
|
537
|
-
"Function breakpoints are not supported by this debug type"
|
|
538
|
-
));
|
|
539
|
-
}
|
|
540
|
-
const primary = [];
|
|
541
|
-
this.breakpointSupportsCondition.set(!session || !!session.capabilities.supportsConditionalBreakpoints);
|
|
542
|
-
this.breakpointItemType.set('functionBreakpoint');
|
|
543
|
-
createAndFillInActionBarActions(this.menu, { arg: functionBreakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
|
|
544
|
-
data.actionBar.clear();
|
|
545
|
-
data.actionBar.push(primary, { icon: true, label: false });
|
|
546
|
-
breakpointIdToActionBarDomeNode.set(functionBreakpoint.getId(), data.actionBar.domNode);
|
|
547
|
-
}
|
|
548
|
-
disposeTemplate(templateData) {
|
|
549
|
-
dispose(templateData.toDispose);
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
FunctionBreakpointsRenderer = FunctionBreakpointsRenderer_1 = ( __decorate([
|
|
553
|
-
( __param(3, IDebugService)),
|
|
554
|
-
( __param(4, ILabelService))
|
|
555
|
-
], FunctionBreakpointsRenderer));
|
|
556
|
-
let DataBreakpointsRenderer = class DataBreakpointsRenderer {
|
|
557
|
-
static { DataBreakpointsRenderer_1 = this; }
|
|
558
|
-
constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService, labelService) {
|
|
559
|
-
this.menu = menu;
|
|
560
|
-
this.breakpointSupportsCondition = breakpointSupportsCondition;
|
|
561
|
-
this.breakpointItemType = breakpointItemType;
|
|
562
|
-
this.debugService = debugService;
|
|
563
|
-
this.labelService = labelService;
|
|
564
|
-
}
|
|
565
|
-
static { this.ID = 'databreakpoints'; }
|
|
566
|
-
get templateId() {
|
|
567
|
-
return DataBreakpointsRenderer_1.ID;
|
|
568
|
-
}
|
|
569
|
-
renderTemplate(container) {
|
|
570
|
-
const data = Object.create(null);
|
|
571
|
-
data.breakpoint = dom.append(container, $('.breakpoint'));
|
|
572
|
-
data.toDispose = [];
|
|
573
|
-
data.icon = $('.icon');
|
|
574
|
-
data.checkbox = createCheckbox(data.toDispose);
|
|
575
|
-
data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
|
|
576
|
-
this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
|
|
577
|
-
}));
|
|
578
|
-
dom.append(data.breakpoint, data.icon);
|
|
579
|
-
dom.append(data.breakpoint, data.checkbox);
|
|
580
|
-
data.name = dom.append(data.breakpoint, $('span.name'));
|
|
581
|
-
data.accessType = dom.append(data.breakpoint, $('span.access-type'));
|
|
582
|
-
data.condition = dom.append(data.breakpoint, $('span.condition'));
|
|
583
|
-
data.actionBar = ( new ActionBar(data.breakpoint));
|
|
584
|
-
data.toDispose.push(data.actionBar);
|
|
585
|
-
return data;
|
|
586
|
-
}
|
|
587
|
-
renderElement(dataBreakpoint, _index, data) {
|
|
588
|
-
data.context = dataBreakpoint;
|
|
589
|
-
data.name.textContent = dataBreakpoint.description;
|
|
590
|
-
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), dataBreakpoint, this.labelService);
|
|
591
|
-
data.icon.className = ThemeIcon.asClassName(icon);
|
|
592
|
-
data.icon.title = message ? message : '';
|
|
593
|
-
data.checkbox.checked = dataBreakpoint.enabled;
|
|
594
|
-
data.breakpoint.title = message ? message : '';
|
|
595
|
-
const session = this.debugService.getViewModel().focusedSession;
|
|
596
|
-
data.breakpoint.classList.toggle('disabled', (session && !session.capabilities.supportsDataBreakpoints) || !this.debugService.getModel().areBreakpointsActivated());
|
|
597
|
-
if (session && !session.capabilities.supportsDataBreakpoints) {
|
|
598
|
-
data.breakpoint.title = ( localizeWithPath(
|
|
599
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
600
|
-
'dataBreakpointsNotSupported',
|
|
601
|
-
"Data breakpoints are not supported by this debug type"
|
|
602
|
-
));
|
|
603
|
-
}
|
|
604
|
-
if (dataBreakpoint.accessType) {
|
|
605
|
-
const accessType = dataBreakpoint.accessType === 'read' ? ( localizeWithPath('vs/workbench/contrib/debug/browser/breakpointsView', 'read', "Read")) : dataBreakpoint.accessType === 'write' ? ( localizeWithPath('vs/workbench/contrib/debug/browser/breakpointsView', 'write', "Write")) : ( localizeWithPath('vs/workbench/contrib/debug/browser/breakpointsView', 'access', "Access"));
|
|
606
|
-
data.accessType.textContent = accessType;
|
|
607
|
-
}
|
|
608
|
-
else {
|
|
609
|
-
data.accessType.textContent = '';
|
|
610
|
-
}
|
|
611
|
-
if (dataBreakpoint.condition && dataBreakpoint.hitCondition) {
|
|
612
|
-
data.condition.textContent = ( localizeWithPath(
|
|
613
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
614
|
-
'expressionAndHitCount',
|
|
615
|
-
"Condition: {0} | Hit Count: {1}",
|
|
616
|
-
dataBreakpoint.condition,
|
|
617
|
-
dataBreakpoint.hitCondition
|
|
618
|
-
));
|
|
619
|
-
}
|
|
620
|
-
else {
|
|
621
|
-
data.condition.textContent = dataBreakpoint.condition || dataBreakpoint.hitCondition || '';
|
|
622
|
-
}
|
|
623
|
-
const primary = [];
|
|
624
|
-
this.breakpointSupportsCondition.set(!session || !!session.capabilities.supportsConditionalBreakpoints);
|
|
625
|
-
this.breakpointItemType.set('dataBreakpoint');
|
|
626
|
-
createAndFillInActionBarActions(this.menu, { arg: dataBreakpoint, shouldForwardArgs: true }, { primary, secondary: [] }, 'inline');
|
|
627
|
-
data.actionBar.clear();
|
|
628
|
-
data.actionBar.push(primary, { icon: true, label: false });
|
|
629
|
-
breakpointIdToActionBarDomeNode.set(dataBreakpoint.getId(), data.actionBar.domNode);
|
|
630
|
-
}
|
|
631
|
-
disposeTemplate(templateData) {
|
|
632
|
-
dispose(templateData.toDispose);
|
|
633
|
-
}
|
|
634
|
-
};
|
|
635
|
-
DataBreakpointsRenderer = DataBreakpointsRenderer_1 = ( __decorate([
|
|
636
|
-
( __param(3, IDebugService)),
|
|
637
|
-
( __param(4, ILabelService))
|
|
638
|
-
], DataBreakpointsRenderer));
|
|
639
|
-
let InstructionBreakpointsRenderer = class InstructionBreakpointsRenderer {
|
|
640
|
-
static { InstructionBreakpointsRenderer_1 = this; }
|
|
641
|
-
constructor(debugService, labelService) {
|
|
642
|
-
this.debugService = debugService;
|
|
643
|
-
this.labelService = labelService;
|
|
644
|
-
}
|
|
645
|
-
static { this.ID = 'instructionBreakpoints'; }
|
|
646
|
-
get templateId() {
|
|
647
|
-
return InstructionBreakpointsRenderer_1.ID;
|
|
648
|
-
}
|
|
649
|
-
renderTemplate(container) {
|
|
650
|
-
const data = Object.create(null);
|
|
651
|
-
data.toDispose = [];
|
|
652
|
-
data.breakpoint = dom.append(container, $('.breakpoint'));
|
|
653
|
-
data.icon = $('.icon');
|
|
654
|
-
data.checkbox = createCheckbox(data.toDispose);
|
|
655
|
-
data.toDispose.push(dom.addStandardDisposableListener(data.checkbox, 'change', (e) => {
|
|
656
|
-
this.debugService.enableOrDisableBreakpoints(!data.context.enabled, data.context);
|
|
657
|
-
}));
|
|
658
|
-
dom.append(data.breakpoint, data.icon);
|
|
659
|
-
dom.append(data.breakpoint, data.checkbox);
|
|
660
|
-
data.name = dom.append(data.breakpoint, $('span.name'));
|
|
661
|
-
data.address = dom.append(data.breakpoint, $('span.file-path'));
|
|
662
|
-
data.actionBar = ( new ActionBar(data.breakpoint));
|
|
663
|
-
data.toDispose.push(data.actionBar);
|
|
664
|
-
return data;
|
|
665
|
-
}
|
|
666
|
-
renderElement(breakpoint, index, data) {
|
|
667
|
-
data.context = breakpoint;
|
|
668
|
-
data.breakpoint.classList.toggle('disabled', !this.debugService.getModel().areBreakpointsActivated());
|
|
669
|
-
data.name.textContent = '0x' + ( breakpoint.address.toString(16));
|
|
670
|
-
data.name.title = `Decimal address: breakpoint.address.toString()`;
|
|
671
|
-
data.checkbox.checked = breakpoint.enabled;
|
|
672
|
-
const { message, icon } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), breakpoint, this.labelService);
|
|
673
|
-
data.icon.className = ThemeIcon.asClassName(icon);
|
|
674
|
-
data.breakpoint.title = breakpoint.message || message || '';
|
|
675
|
-
const debugActive = this.debugService.state === 3 || this.debugService.state === 2 ;
|
|
676
|
-
if (debugActive && !breakpoint.verified) {
|
|
677
|
-
data.breakpoint.classList.add('disabled');
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
disposeTemplate(templateData) {
|
|
681
|
-
dispose(templateData.toDispose);
|
|
682
|
-
}
|
|
683
|
-
};
|
|
684
|
-
InstructionBreakpointsRenderer = InstructionBreakpointsRenderer_1 = ( __decorate([
|
|
685
|
-
( __param(0, IDebugService)),
|
|
686
|
-
( __param(1, ILabelService))
|
|
687
|
-
], InstructionBreakpointsRenderer));
|
|
688
|
-
class FunctionBreakpointInputRenderer {
|
|
689
|
-
constructor(view, debugService, contextViewService, labelService) {
|
|
690
|
-
this.view = view;
|
|
691
|
-
this.debugService = debugService;
|
|
692
|
-
this.contextViewService = contextViewService;
|
|
693
|
-
this.labelService = labelService;
|
|
694
|
-
}
|
|
695
|
-
static { this.ID = 'functionbreakpointinput'; }
|
|
696
|
-
get templateId() {
|
|
697
|
-
return FunctionBreakpointInputRenderer.ID;
|
|
698
|
-
}
|
|
699
|
-
renderTemplate(container) {
|
|
700
|
-
const template = Object.create(null);
|
|
701
|
-
const toDispose = [];
|
|
702
|
-
const breakpoint = dom.append(container, $('.breakpoint'));
|
|
703
|
-
template.icon = $('.icon');
|
|
704
|
-
template.checkbox = createCheckbox(toDispose);
|
|
705
|
-
dom.append(breakpoint, template.icon);
|
|
706
|
-
dom.append(breakpoint, template.checkbox);
|
|
707
|
-
this.view.breakpointInputFocused.set(true);
|
|
708
|
-
const inputBoxContainer = dom.append(breakpoint, $('.inputBoxContainer'));
|
|
709
|
-
const inputBox = ( new InputBox(
|
|
710
|
-
inputBoxContainer,
|
|
711
|
-
this.contextViewService,
|
|
712
|
-
{ inputBoxStyles: defaultInputBoxStyles }
|
|
713
|
-
));
|
|
714
|
-
const wrapUp = (success) => {
|
|
715
|
-
template.updating = true;
|
|
716
|
-
try {
|
|
717
|
-
this.view.breakpointInputFocused.set(false);
|
|
718
|
-
const id = template.breakpoint.getId();
|
|
719
|
-
if (success) {
|
|
720
|
-
if (template.type === 'name') {
|
|
721
|
-
this.debugService.updateFunctionBreakpoint(id, { name: inputBox.value });
|
|
722
|
-
}
|
|
723
|
-
if (template.type === 'condition') {
|
|
724
|
-
this.debugService.updateFunctionBreakpoint(id, { condition: inputBox.value });
|
|
725
|
-
}
|
|
726
|
-
if (template.type === 'hitCount') {
|
|
727
|
-
this.debugService.updateFunctionBreakpoint(id, { hitCondition: inputBox.value });
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
else {
|
|
731
|
-
if (template.type === 'name' && !template.breakpoint.name) {
|
|
732
|
-
this.debugService.removeFunctionBreakpoints(id);
|
|
733
|
-
}
|
|
734
|
-
else {
|
|
735
|
-
this.view.renderInputBox(undefined);
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
finally {
|
|
740
|
-
template.updating = false;
|
|
741
|
-
}
|
|
742
|
-
};
|
|
743
|
-
toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e) => {
|
|
744
|
-
const isEscape = e.equals(9 );
|
|
745
|
-
const isEnter = e.equals(3 );
|
|
746
|
-
if (isEscape || isEnter) {
|
|
747
|
-
e.preventDefault();
|
|
748
|
-
e.stopPropagation();
|
|
749
|
-
wrapUp(isEnter);
|
|
750
|
-
}
|
|
751
|
-
}));
|
|
752
|
-
toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => {
|
|
753
|
-
if (!template.updating) {
|
|
754
|
-
wrapUp(!!inputBox.value);
|
|
755
|
-
}
|
|
756
|
-
}));
|
|
757
|
-
template.inputBox = inputBox;
|
|
758
|
-
template.toDispose = toDispose;
|
|
759
|
-
return template;
|
|
760
|
-
}
|
|
761
|
-
renderElement(functionBreakpoint, _index, data) {
|
|
762
|
-
data.breakpoint = functionBreakpoint;
|
|
763
|
-
data.type = this.view.inputBoxData?.type || 'name';
|
|
764
|
-
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), functionBreakpoint, this.labelService);
|
|
765
|
-
data.icon.className = ThemeIcon.asClassName(icon);
|
|
766
|
-
data.icon.title = message ? message : '';
|
|
767
|
-
data.checkbox.checked = functionBreakpoint.enabled;
|
|
768
|
-
data.checkbox.disabled = true;
|
|
769
|
-
data.inputBox.value = functionBreakpoint.name || '';
|
|
770
|
-
let placeholder = ( localizeWithPath(
|
|
771
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
772
|
-
'functionBreakpointPlaceholder',
|
|
773
|
-
"Function to break on"
|
|
774
|
-
));
|
|
775
|
-
let ariaLabel = ( localizeWithPath(
|
|
776
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
777
|
-
'functionBreakPointInputAriaLabel',
|
|
778
|
-
"Type function breakpoint."
|
|
779
|
-
));
|
|
780
|
-
if (data.type === 'condition') {
|
|
781
|
-
data.inputBox.value = functionBreakpoint.condition || '';
|
|
782
|
-
placeholder = ( localizeWithPath(
|
|
783
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
784
|
-
'functionBreakpointExpressionPlaceholder',
|
|
785
|
-
"Break when expression evaluates to true"
|
|
786
|
-
));
|
|
787
|
-
ariaLabel = ( localizeWithPath(
|
|
788
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
789
|
-
'functionBreakPointExpresionAriaLabel',
|
|
790
|
-
"Type expression. Function breakpoint will break when expression evaluates to true"
|
|
791
|
-
));
|
|
792
|
-
}
|
|
793
|
-
else if (data.type === 'hitCount') {
|
|
794
|
-
data.inputBox.value = functionBreakpoint.hitCondition || '';
|
|
795
|
-
placeholder = ( localizeWithPath(
|
|
796
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
797
|
-
'functionBreakpointHitCountPlaceholder',
|
|
798
|
-
"Break when hit count is met"
|
|
799
|
-
));
|
|
800
|
-
ariaLabel = ( localizeWithPath(
|
|
801
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
802
|
-
'functionBreakPointHitCountAriaLabel',
|
|
803
|
-
"Type hit count. Function breakpoint will break when hit count is met."
|
|
804
|
-
));
|
|
805
|
-
}
|
|
806
|
-
data.inputBox.setAriaLabel(ariaLabel);
|
|
807
|
-
data.inputBox.setPlaceHolder(placeholder);
|
|
808
|
-
setTimeout(() => {
|
|
809
|
-
data.inputBox.focus();
|
|
810
|
-
data.inputBox.select();
|
|
811
|
-
}, 0);
|
|
812
|
-
}
|
|
813
|
-
disposeTemplate(templateData) {
|
|
814
|
-
dispose(templateData.toDispose);
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
class DataBreakpointInputRenderer {
|
|
818
|
-
constructor(view, debugService, contextViewService, labelService) {
|
|
819
|
-
this.view = view;
|
|
820
|
-
this.debugService = debugService;
|
|
821
|
-
this.contextViewService = contextViewService;
|
|
822
|
-
this.labelService = labelService;
|
|
823
|
-
}
|
|
824
|
-
static { this.ID = 'databreakpointinput'; }
|
|
825
|
-
get templateId() {
|
|
826
|
-
return DataBreakpointInputRenderer.ID;
|
|
827
|
-
}
|
|
828
|
-
renderTemplate(container) {
|
|
829
|
-
const template = Object.create(null);
|
|
830
|
-
const toDispose = [];
|
|
831
|
-
const breakpoint = dom.append(container, $('.breakpoint'));
|
|
832
|
-
template.icon = $('.icon');
|
|
833
|
-
template.checkbox = createCheckbox(toDispose);
|
|
834
|
-
dom.append(breakpoint, template.icon);
|
|
835
|
-
dom.append(breakpoint, template.checkbox);
|
|
836
|
-
this.view.breakpointInputFocused.set(true);
|
|
837
|
-
const inputBoxContainer = dom.append(breakpoint, $('.inputBoxContainer'));
|
|
838
|
-
const inputBox = ( new InputBox(
|
|
839
|
-
inputBoxContainer,
|
|
840
|
-
this.contextViewService,
|
|
841
|
-
{ inputBoxStyles: defaultInputBoxStyles }
|
|
842
|
-
));
|
|
843
|
-
const wrapUp = (success) => {
|
|
844
|
-
template.updating = true;
|
|
845
|
-
try {
|
|
846
|
-
this.view.breakpointInputFocused.set(false);
|
|
847
|
-
const id = template.breakpoint.getId();
|
|
848
|
-
if (success) {
|
|
849
|
-
if (template.type === 'condition') {
|
|
850
|
-
this.debugService.updateDataBreakpoint(id, { condition: inputBox.value });
|
|
851
|
-
}
|
|
852
|
-
if (template.type === 'hitCount') {
|
|
853
|
-
this.debugService.updateDataBreakpoint(id, { hitCondition: inputBox.value });
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
else {
|
|
857
|
-
this.view.renderInputBox(undefined);
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
finally {
|
|
861
|
-
template.updating = false;
|
|
862
|
-
}
|
|
863
|
-
};
|
|
864
|
-
toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e) => {
|
|
865
|
-
const isEscape = e.equals(9 );
|
|
866
|
-
const isEnter = e.equals(3 );
|
|
867
|
-
if (isEscape || isEnter) {
|
|
868
|
-
e.preventDefault();
|
|
869
|
-
e.stopPropagation();
|
|
870
|
-
wrapUp(isEnter);
|
|
871
|
-
}
|
|
872
|
-
}));
|
|
873
|
-
toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => {
|
|
874
|
-
if (!template.updating) {
|
|
875
|
-
wrapUp(!!inputBox.value);
|
|
876
|
-
}
|
|
877
|
-
}));
|
|
878
|
-
template.inputBox = inputBox;
|
|
879
|
-
template.toDispose = toDispose;
|
|
880
|
-
return template;
|
|
881
|
-
}
|
|
882
|
-
renderElement(dataBreakpoint, _index, data) {
|
|
883
|
-
data.breakpoint = dataBreakpoint;
|
|
884
|
-
data.type = this.view.inputBoxData?.type || 'condition';
|
|
885
|
-
const { icon, message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), dataBreakpoint, this.labelService);
|
|
886
|
-
data.icon.className = ThemeIcon.asClassName(icon);
|
|
887
|
-
data.icon.title = message ? message : '';
|
|
888
|
-
data.checkbox.checked = dataBreakpoint.enabled;
|
|
889
|
-
data.checkbox.disabled = true;
|
|
890
|
-
data.inputBox.value = '';
|
|
891
|
-
let placeholder = '';
|
|
892
|
-
let ariaLabel = '';
|
|
893
|
-
if (data.type === 'condition') {
|
|
894
|
-
data.inputBox.value = dataBreakpoint.condition || '';
|
|
895
|
-
placeholder = ( localizeWithPath(
|
|
896
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
897
|
-
'dataBreakpointExpressionPlaceholder',
|
|
898
|
-
"Break when expression evaluates to true"
|
|
899
|
-
));
|
|
900
|
-
ariaLabel = ( localizeWithPath(
|
|
901
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
902
|
-
'dataBreakPointExpresionAriaLabel',
|
|
903
|
-
"Type expression. Data breakpoint will break when expression evaluates to true"
|
|
904
|
-
));
|
|
905
|
-
}
|
|
906
|
-
else if (data.type === 'hitCount') {
|
|
907
|
-
data.inputBox.value = dataBreakpoint.hitCondition || '';
|
|
908
|
-
placeholder = ( localizeWithPath(
|
|
909
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
910
|
-
'dataBreakpointHitCountPlaceholder',
|
|
911
|
-
"Break when hit count is met"
|
|
912
|
-
));
|
|
913
|
-
ariaLabel = ( localizeWithPath(
|
|
914
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
915
|
-
'dataBreakPointHitCountAriaLabel',
|
|
916
|
-
"Type hit count. Data breakpoint will break when hit count is met."
|
|
917
|
-
));
|
|
918
|
-
}
|
|
919
|
-
data.inputBox.setAriaLabel(ariaLabel);
|
|
920
|
-
data.inputBox.setPlaceHolder(placeholder);
|
|
921
|
-
setTimeout(() => {
|
|
922
|
-
data.inputBox.focus();
|
|
923
|
-
data.inputBox.select();
|
|
924
|
-
}, 0);
|
|
925
|
-
}
|
|
926
|
-
disposeTemplate(templateData) {
|
|
927
|
-
dispose(templateData.toDispose);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
class ExceptionBreakpointInputRenderer {
|
|
931
|
-
constructor(view, debugService, contextViewService) {
|
|
932
|
-
this.view = view;
|
|
933
|
-
this.debugService = debugService;
|
|
934
|
-
this.contextViewService = contextViewService;
|
|
935
|
-
}
|
|
936
|
-
static { this.ID = 'exceptionbreakpointinput'; }
|
|
937
|
-
get templateId() {
|
|
938
|
-
return ExceptionBreakpointInputRenderer.ID;
|
|
939
|
-
}
|
|
940
|
-
renderTemplate(container) {
|
|
941
|
-
const template = Object.create(null);
|
|
942
|
-
const toDispose = [];
|
|
943
|
-
const breakpoint = dom.append(container, $('.breakpoint'));
|
|
944
|
-
breakpoint.classList.add('exception');
|
|
945
|
-
template.checkbox = createCheckbox(toDispose);
|
|
946
|
-
dom.append(breakpoint, template.checkbox);
|
|
947
|
-
this.view.breakpointInputFocused.set(true);
|
|
948
|
-
const inputBoxContainer = dom.append(breakpoint, $('.inputBoxContainer'));
|
|
949
|
-
const inputBox = ( new InputBox(inputBoxContainer, this.contextViewService, {
|
|
950
|
-
ariaLabel: ( localizeWithPath(
|
|
951
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
952
|
-
'exceptionBreakpointAriaLabel',
|
|
953
|
-
"Type exception breakpoint condition"
|
|
954
|
-
)),
|
|
955
|
-
inputBoxStyles: defaultInputBoxStyles
|
|
956
|
-
}));
|
|
957
|
-
const wrapUp = (success) => {
|
|
958
|
-
this.view.breakpointInputFocused.set(false);
|
|
959
|
-
let newCondition = template.breakpoint.condition;
|
|
960
|
-
if (success) {
|
|
961
|
-
newCondition = inputBox.value !== '' ? inputBox.value : undefined;
|
|
962
|
-
}
|
|
963
|
-
this.debugService.setExceptionBreakpointCondition(template.breakpoint, newCondition);
|
|
964
|
-
};
|
|
965
|
-
toDispose.push(dom.addStandardDisposableListener(inputBox.inputElement, 'keydown', (e) => {
|
|
966
|
-
const isEscape = e.equals(9 );
|
|
967
|
-
const isEnter = e.equals(3 );
|
|
968
|
-
if (isEscape || isEnter) {
|
|
969
|
-
e.preventDefault();
|
|
970
|
-
e.stopPropagation();
|
|
971
|
-
wrapUp(isEnter);
|
|
972
|
-
}
|
|
973
|
-
}));
|
|
974
|
-
toDispose.push(dom.addDisposableListener(inputBox.inputElement, 'blur', () => {
|
|
975
|
-
setTimeout(() => {
|
|
976
|
-
wrapUp(true);
|
|
977
|
-
});
|
|
978
|
-
}));
|
|
979
|
-
template.inputBox = inputBox;
|
|
980
|
-
template.toDispose = toDispose;
|
|
981
|
-
return template;
|
|
982
|
-
}
|
|
983
|
-
renderElement(exceptionBreakpoint, _index, data) {
|
|
984
|
-
const placeHolder = exceptionBreakpoint.conditionDescription || ( localizeWithPath(
|
|
985
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
986
|
-
'exceptionBreakpointPlaceholder',
|
|
987
|
-
"Break when expression evaluates to true"
|
|
988
|
-
));
|
|
989
|
-
data.inputBox.setPlaceHolder(placeHolder);
|
|
990
|
-
data.breakpoint = exceptionBreakpoint;
|
|
991
|
-
data.checkbox.checked = exceptionBreakpoint.enabled;
|
|
992
|
-
data.checkbox.disabled = true;
|
|
993
|
-
data.inputBox.value = exceptionBreakpoint.condition || '';
|
|
994
|
-
setTimeout(() => {
|
|
995
|
-
data.inputBox.focus();
|
|
996
|
-
data.inputBox.select();
|
|
997
|
-
}, 0);
|
|
998
|
-
}
|
|
999
|
-
disposeTemplate(templateData) {
|
|
1000
|
-
dispose(templateData.toDispose);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
class BreakpointsAccessibilityProvider {
|
|
1004
|
-
constructor(debugService, labelService) {
|
|
1005
|
-
this.debugService = debugService;
|
|
1006
|
-
this.labelService = labelService;
|
|
1007
|
-
}
|
|
1008
|
-
getWidgetAriaLabel() {
|
|
1009
|
-
return ( localizeWithPath(
|
|
1010
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1011
|
-
'breakpoints',
|
|
1012
|
-
"Breakpoints"
|
|
1013
|
-
));
|
|
1014
|
-
}
|
|
1015
|
-
getRole() {
|
|
1016
|
-
return 'checkbox';
|
|
1017
|
-
}
|
|
1018
|
-
isChecked(breakpoint) {
|
|
1019
|
-
return breakpoint.enabled;
|
|
1020
|
-
}
|
|
1021
|
-
getAriaLabel(element) {
|
|
1022
|
-
if (element instanceof ExceptionBreakpoint) {
|
|
1023
|
-
return ( element.toString());
|
|
1024
|
-
}
|
|
1025
|
-
const { message } = getBreakpointMessageAndIcon(this.debugService.state, this.debugService.getModel().areBreakpointsActivated(), element, this.labelService);
|
|
1026
|
-
const toString = ( element.toString());
|
|
1027
|
-
return message ? `${toString}, ${message}` : toString;
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
function openBreakpointSource(breakpoint, sideBySide, preserveFocus, pinned, debugService, editorService) {
|
|
1031
|
-
if (breakpoint.uri.scheme === DEBUG_SCHEME && debugService.state === 0 ) {
|
|
1032
|
-
return Promise.resolve(undefined);
|
|
1033
|
-
}
|
|
1034
|
-
const selection = breakpoint.endLineNumber ? {
|
|
1035
|
-
startLineNumber: breakpoint.lineNumber,
|
|
1036
|
-
endLineNumber: breakpoint.endLineNumber,
|
|
1037
|
-
startColumn: breakpoint.column || 1,
|
|
1038
|
-
endColumn: breakpoint.endColumn || 1073741824
|
|
1039
|
-
} : {
|
|
1040
|
-
startLineNumber: breakpoint.lineNumber,
|
|
1041
|
-
startColumn: breakpoint.column || 1,
|
|
1042
|
-
endLineNumber: breakpoint.lineNumber,
|
|
1043
|
-
endColumn: breakpoint.column || 1073741824
|
|
1044
|
-
};
|
|
1045
|
-
return editorService.openEditor({
|
|
1046
|
-
resource: breakpoint.uri,
|
|
1047
|
-
options: {
|
|
1048
|
-
preserveFocus,
|
|
1049
|
-
selection,
|
|
1050
|
-
revealIfOpened: true,
|
|
1051
|
-
selectionRevealType: 1 ,
|
|
1052
|
-
pinned
|
|
1053
|
-
}
|
|
1054
|
-
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP);
|
|
1055
|
-
}
|
|
1056
|
-
function getBreakpointMessageAndIcon(state, breakpointsActivated, breakpoint$1, labelService) {
|
|
1057
|
-
const debugActive = state === 3 || state === 2 ;
|
|
1058
|
-
const breakpointIcon = breakpoint$1 instanceof DataBreakpoint ? dataBreakpoint : breakpoint$1 instanceof FunctionBreakpoint ? functionBreakpoint : breakpoint$1.logMessage ? logBreakpoint : breakpoint;
|
|
1059
|
-
if (!breakpoint$1.enabled || !breakpointsActivated) {
|
|
1060
|
-
return {
|
|
1061
|
-
icon: breakpointIcon.disabled,
|
|
1062
|
-
message: breakpoint$1.logMessage ? ( localizeWithPath(
|
|
1063
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1064
|
-
'disabledLogpoint',
|
|
1065
|
-
"Disabled Logpoint"
|
|
1066
|
-
)) : ( localizeWithPath(
|
|
1067
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1068
|
-
'disabledBreakpoint',
|
|
1069
|
-
"Disabled Breakpoint"
|
|
1070
|
-
)),
|
|
1071
|
-
};
|
|
1072
|
-
}
|
|
1073
|
-
const appendMessage = (text) => {
|
|
1074
|
-
return ('message' in breakpoint$1 && breakpoint$1.message) ? text.concat(', ' + breakpoint$1.message) : text;
|
|
1075
|
-
};
|
|
1076
|
-
if (debugActive && !breakpoint$1.verified) {
|
|
1077
|
-
return {
|
|
1078
|
-
icon: breakpointIcon.unverified,
|
|
1079
|
-
message: ('message' in breakpoint$1 && breakpoint$1.message) ? breakpoint$1.message : (breakpoint$1.logMessage ? ( localizeWithPath(
|
|
1080
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1081
|
-
'unverifiedLogpoint',
|
|
1082
|
-
"Unverified Logpoint"
|
|
1083
|
-
)) : ( localizeWithPath(
|
|
1084
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1085
|
-
'unverifiedBreakpoint',
|
|
1086
|
-
"Unverified Breakpoint"
|
|
1087
|
-
))),
|
|
1088
|
-
showAdapterUnverifiedMessage: true
|
|
1089
|
-
};
|
|
1090
|
-
}
|
|
1091
|
-
if (breakpoint$1 instanceof DataBreakpoint) {
|
|
1092
|
-
if (!breakpoint$1.supported) {
|
|
1093
|
-
return {
|
|
1094
|
-
icon: breakpointIcon.unverified,
|
|
1095
|
-
message: ( localizeWithPath(
|
|
1096
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1097
|
-
'dataBreakpointUnsupported',
|
|
1098
|
-
"Data breakpoints not supported by this debug type"
|
|
1099
|
-
)),
|
|
1100
|
-
};
|
|
1101
|
-
}
|
|
1102
|
-
return {
|
|
1103
|
-
icon: breakpointIcon.regular,
|
|
1104
|
-
message: breakpoint$1.message || ( localizeWithPath(
|
|
1105
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1106
|
-
'dataBreakpoint',
|
|
1107
|
-
"Data Breakpoint"
|
|
1108
|
-
))
|
|
1109
|
-
};
|
|
1110
|
-
}
|
|
1111
|
-
if (breakpoint$1 instanceof FunctionBreakpoint) {
|
|
1112
|
-
if (!breakpoint$1.supported) {
|
|
1113
|
-
return {
|
|
1114
|
-
icon: breakpointIcon.unverified,
|
|
1115
|
-
message: ( localizeWithPath(
|
|
1116
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1117
|
-
'functionBreakpointUnsupported',
|
|
1118
|
-
"Function breakpoints not supported by this debug type"
|
|
1119
|
-
)),
|
|
1120
|
-
};
|
|
1121
|
-
}
|
|
1122
|
-
const messages = [];
|
|
1123
|
-
messages.push(breakpoint$1.message || ( localizeWithPath(
|
|
1124
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1125
|
-
'functionBreakpoint',
|
|
1126
|
-
"Function Breakpoint"
|
|
1127
|
-
)));
|
|
1128
|
-
if (breakpoint$1.condition) {
|
|
1129
|
-
messages.push(( localizeWithPath(
|
|
1130
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1131
|
-
'expression',
|
|
1132
|
-
"Condition: {0}",
|
|
1133
|
-
breakpoint$1.condition
|
|
1134
|
-
)));
|
|
1135
|
-
}
|
|
1136
|
-
if (breakpoint$1.hitCondition) {
|
|
1137
|
-
messages.push(( localizeWithPath(
|
|
1138
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1139
|
-
'hitCount',
|
|
1140
|
-
"Hit Count: {0}",
|
|
1141
|
-
breakpoint$1.hitCondition
|
|
1142
|
-
)));
|
|
1143
|
-
}
|
|
1144
|
-
return {
|
|
1145
|
-
icon: breakpointIcon.regular,
|
|
1146
|
-
message: appendMessage(messages.join('\n'))
|
|
1147
|
-
};
|
|
1148
|
-
}
|
|
1149
|
-
if (breakpoint$1 instanceof InstructionBreakpoint) {
|
|
1150
|
-
if (!breakpoint$1.supported) {
|
|
1151
|
-
return {
|
|
1152
|
-
icon: breakpointIcon.unverified,
|
|
1153
|
-
message: ( localizeWithPath(
|
|
1154
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1155
|
-
'instructionBreakpointUnsupported',
|
|
1156
|
-
"Instruction breakpoints not supported by this debug type"
|
|
1157
|
-
)),
|
|
1158
|
-
};
|
|
1159
|
-
}
|
|
1160
|
-
const messages = [];
|
|
1161
|
-
if (breakpoint$1.message) {
|
|
1162
|
-
messages.push(breakpoint$1.message);
|
|
1163
|
-
}
|
|
1164
|
-
else if (breakpoint$1.instructionReference) {
|
|
1165
|
-
messages.push(( localizeWithPath(
|
|
1166
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1167
|
-
'instructionBreakpointAtAddress',
|
|
1168
|
-
"Instruction breakpoint at address {0}",
|
|
1169
|
-
breakpoint$1.instructionReference
|
|
1170
|
-
)));
|
|
1171
|
-
}
|
|
1172
|
-
else {
|
|
1173
|
-
messages.push(( localizeWithPath(
|
|
1174
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1175
|
-
'instructionBreakpoint',
|
|
1176
|
-
"Instruction breakpoint"
|
|
1177
|
-
)));
|
|
1178
|
-
}
|
|
1179
|
-
if (breakpoint$1.hitCondition) {
|
|
1180
|
-
messages.push(( localizeWithPath(
|
|
1181
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1182
|
-
'hitCount',
|
|
1183
|
-
"Hit Count: {0}",
|
|
1184
|
-
breakpoint$1.hitCondition
|
|
1185
|
-
)));
|
|
1186
|
-
}
|
|
1187
|
-
return {
|
|
1188
|
-
icon: breakpointIcon.regular,
|
|
1189
|
-
message: appendMessage(messages.join('\n'))
|
|
1190
|
-
};
|
|
1191
|
-
}
|
|
1192
|
-
if (breakpoint$1.logMessage || breakpoint$1.condition || breakpoint$1.hitCondition) {
|
|
1193
|
-
const messages = [];
|
|
1194
|
-
if (!breakpoint$1.supported) {
|
|
1195
|
-
return {
|
|
1196
|
-
icon: debugBreakpointUnsupported,
|
|
1197
|
-
message: ( localizeWithPath(
|
|
1198
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1199
|
-
'breakpointUnsupported',
|
|
1200
|
-
"Breakpoints of this type are not supported by the debugger"
|
|
1201
|
-
)),
|
|
1202
|
-
};
|
|
1203
|
-
}
|
|
1204
|
-
if (breakpoint$1.logMessage) {
|
|
1205
|
-
messages.push(( localizeWithPath(
|
|
1206
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1207
|
-
'logMessage',
|
|
1208
|
-
"Log Message: {0}",
|
|
1209
|
-
breakpoint$1.logMessage
|
|
1210
|
-
)));
|
|
1211
|
-
}
|
|
1212
|
-
if (breakpoint$1.condition) {
|
|
1213
|
-
messages.push(( localizeWithPath(
|
|
1214
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1215
|
-
'expression',
|
|
1216
|
-
"Condition: {0}",
|
|
1217
|
-
breakpoint$1.condition
|
|
1218
|
-
)));
|
|
1219
|
-
}
|
|
1220
|
-
if (breakpoint$1.hitCondition) {
|
|
1221
|
-
messages.push(( localizeWithPath(
|
|
1222
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1223
|
-
'hitCount',
|
|
1224
|
-
"Hit Count: {0}",
|
|
1225
|
-
breakpoint$1.hitCondition
|
|
1226
|
-
)));
|
|
1227
|
-
}
|
|
1228
|
-
return {
|
|
1229
|
-
icon: breakpoint$1.logMessage ? logBreakpoint.regular : conditionalBreakpoint.regular,
|
|
1230
|
-
message: appendMessage(messages.join('\n'))
|
|
1231
|
-
};
|
|
1232
|
-
}
|
|
1233
|
-
const message = ('message' in breakpoint$1 && breakpoint$1.message) ? breakpoint$1.message : breakpoint$1 instanceof Breakpoint && labelService ? labelService.getUriLabel(breakpoint$1.uri) : ( localizeWithPath(
|
|
1234
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1235
|
-
'breakpoint',
|
|
1236
|
-
"Breakpoint"
|
|
1237
|
-
));
|
|
1238
|
-
return {
|
|
1239
|
-
icon: breakpointIcon.regular,
|
|
1240
|
-
message
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
registerAction2(class extends Action2 {
|
|
1244
|
-
constructor() {
|
|
1245
|
-
super({
|
|
1246
|
-
id: 'workbench.debug.viewlet.action.addFunctionBreakpointAction',
|
|
1247
|
-
title: {
|
|
1248
|
-
value: ( localizeWithPath(
|
|
1249
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1250
|
-
'addFunctionBreakpoint',
|
|
1251
|
-
"Add Function Breakpoint"
|
|
1252
|
-
)),
|
|
1253
|
-
original: 'Add Function Breakpoint',
|
|
1254
|
-
mnemonicTitle: ( localizeWithPath(
|
|
1255
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1256
|
-
{ key: 'miFunctionBreakpoint', comment: ['&& denotes a mnemonic'] },
|
|
1257
|
-
"&&Function Breakpoint..."
|
|
1258
|
-
))
|
|
1259
|
-
},
|
|
1260
|
-
f1: true,
|
|
1261
|
-
icon: watchExpressionsAddFuncBreakpoint,
|
|
1262
|
-
menu: [{
|
|
1263
|
-
id: MenuId.ViewTitle,
|
|
1264
|
-
group: 'navigation',
|
|
1265
|
-
order: 10,
|
|
1266
|
-
when: ( ContextKeyExpr.equals('view', BREAKPOINTS_VIEW_ID))
|
|
1267
|
-
}, {
|
|
1268
|
-
id: MenuId.MenubarNewBreakpointMenu,
|
|
1269
|
-
group: '1_breakpoints',
|
|
1270
|
-
order: 3,
|
|
1271
|
-
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
1272
|
-
}]
|
|
1273
|
-
});
|
|
1274
|
-
}
|
|
1275
|
-
run(accessor) {
|
|
1276
|
-
const debugService = accessor.get(IDebugService);
|
|
1277
|
-
debugService.addFunctionBreakpoint();
|
|
1278
|
-
}
|
|
1279
|
-
});
|
|
1280
|
-
registerAction2(class extends Action2 {
|
|
1281
|
-
constructor() {
|
|
1282
|
-
super({
|
|
1283
|
-
id: 'workbench.debug.viewlet.action.toggleBreakpointsActivatedAction',
|
|
1284
|
-
title: { value: ( localizeWithPath(
|
|
1285
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1286
|
-
'activateBreakpoints',
|
|
1287
|
-
"Toggle Activate Breakpoints"
|
|
1288
|
-
)), original: 'Toggle Activate Breakpoints' },
|
|
1289
|
-
f1: true,
|
|
1290
|
-
icon: breakpointsActivate,
|
|
1291
|
-
menu: {
|
|
1292
|
-
id: MenuId.ViewTitle,
|
|
1293
|
-
group: 'navigation',
|
|
1294
|
-
order: 20,
|
|
1295
|
-
when: ( ContextKeyExpr.equals('view', BREAKPOINTS_VIEW_ID))
|
|
1296
|
-
}
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
|
-
run(accessor) {
|
|
1300
|
-
const debugService = accessor.get(IDebugService);
|
|
1301
|
-
debugService.setBreakpointsActivated(!debugService.getModel().areBreakpointsActivated());
|
|
1302
|
-
}
|
|
1303
|
-
});
|
|
1304
|
-
registerAction2(class extends Action2 {
|
|
1305
|
-
constructor() {
|
|
1306
|
-
super({
|
|
1307
|
-
id: 'workbench.debug.viewlet.action.removeBreakpoint',
|
|
1308
|
-
title: ( localizeWithPath(
|
|
1309
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1310
|
-
'removeBreakpoint',
|
|
1311
|
-
"Remove Breakpoint"
|
|
1312
|
-
)),
|
|
1313
|
-
icon: Codicon.removeClose,
|
|
1314
|
-
menu: [{
|
|
1315
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1316
|
-
group: '3_modification',
|
|
1317
|
-
order: 10,
|
|
1318
|
-
when: ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))
|
|
1319
|
-
}, {
|
|
1320
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1321
|
-
group: 'inline',
|
|
1322
|
-
order: 20,
|
|
1323
|
-
when: ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))
|
|
1324
|
-
}]
|
|
1325
|
-
});
|
|
1326
|
-
}
|
|
1327
|
-
async run(accessor, breakpoint) {
|
|
1328
|
-
const debugService = accessor.get(IDebugService);
|
|
1329
|
-
if (breakpoint instanceof Breakpoint) {
|
|
1330
|
-
await debugService.removeBreakpoints(breakpoint.getId());
|
|
1331
|
-
}
|
|
1332
|
-
else if (breakpoint instanceof FunctionBreakpoint) {
|
|
1333
|
-
await debugService.removeFunctionBreakpoints(breakpoint.getId());
|
|
1334
|
-
}
|
|
1335
|
-
else if (breakpoint instanceof DataBreakpoint) {
|
|
1336
|
-
await debugService.removeDataBreakpoints(breakpoint.getId());
|
|
1337
|
-
}
|
|
1338
|
-
else if (breakpoint instanceof InstructionBreakpoint) {
|
|
1339
|
-
await debugService.removeInstructionBreakpoints(breakpoint.instructionReference);
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
});
|
|
1343
|
-
registerAction2(class extends Action2 {
|
|
1344
|
-
constructor() {
|
|
1345
|
-
super({
|
|
1346
|
-
id: 'workbench.debug.viewlet.action.removeAllBreakpoints',
|
|
1347
|
-
title: {
|
|
1348
|
-
original: 'Remove All Breakpoints',
|
|
1349
|
-
value: ( localizeWithPath(
|
|
1350
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1351
|
-
'removeAllBreakpoints',
|
|
1352
|
-
"Remove All Breakpoints"
|
|
1353
|
-
)),
|
|
1354
|
-
mnemonicTitle: ( localizeWithPath(
|
|
1355
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1356
|
-
{ key: 'miRemoveAllBreakpoints', comment: ['&& denotes a mnemonic'] },
|
|
1357
|
-
"Remove &&All Breakpoints"
|
|
1358
|
-
))
|
|
1359
|
-
},
|
|
1360
|
-
f1: true,
|
|
1361
|
-
icon: breakpointsRemoveAll,
|
|
1362
|
-
menu: [{
|
|
1363
|
-
id: MenuId.ViewTitle,
|
|
1364
|
-
group: 'navigation',
|
|
1365
|
-
order: 30,
|
|
1366
|
-
when: ( ContextKeyExpr.equals('view', BREAKPOINTS_VIEW_ID))
|
|
1367
|
-
}, {
|
|
1368
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1369
|
-
group: '3_modification',
|
|
1370
|
-
order: 20,
|
|
1371
|
-
when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
|
|
1372
|
-
}, {
|
|
1373
|
-
id: MenuId.MenubarDebugMenu,
|
|
1374
|
-
group: '5_breakpoints',
|
|
1375
|
-
order: 3,
|
|
1376
|
-
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
1377
|
-
}]
|
|
1378
|
-
});
|
|
1379
|
-
}
|
|
1380
|
-
run(accessor) {
|
|
1381
|
-
const debugService = accessor.get(IDebugService);
|
|
1382
|
-
debugService.removeBreakpoints();
|
|
1383
|
-
debugService.removeFunctionBreakpoints();
|
|
1384
|
-
debugService.removeDataBreakpoints();
|
|
1385
|
-
debugService.removeInstructionBreakpoints();
|
|
1386
|
-
}
|
|
1387
|
-
});
|
|
1388
|
-
registerAction2(class extends Action2 {
|
|
1389
|
-
constructor() {
|
|
1390
|
-
super({
|
|
1391
|
-
id: 'workbench.debug.viewlet.action.enableAllBreakpoints',
|
|
1392
|
-
title: {
|
|
1393
|
-
original: 'Enable All Breakpoints',
|
|
1394
|
-
value: ( localizeWithPath(
|
|
1395
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1396
|
-
'enableAllBreakpoints',
|
|
1397
|
-
"Enable All Breakpoints"
|
|
1398
|
-
)),
|
|
1399
|
-
mnemonicTitle: ( localizeWithPath(
|
|
1400
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1401
|
-
{ key: 'miEnableAllBreakpoints', comment: ['&& denotes a mnemonic'] },
|
|
1402
|
-
"&&Enable All Breakpoints"
|
|
1403
|
-
)),
|
|
1404
|
-
},
|
|
1405
|
-
f1: true,
|
|
1406
|
-
precondition: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
1407
|
-
menu: [{
|
|
1408
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1409
|
-
group: 'z_commands',
|
|
1410
|
-
order: 10,
|
|
1411
|
-
when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
|
|
1412
|
-
}, {
|
|
1413
|
-
id: MenuId.MenubarDebugMenu,
|
|
1414
|
-
group: '5_breakpoints',
|
|
1415
|
-
order: 1,
|
|
1416
|
-
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
1417
|
-
}]
|
|
1418
|
-
});
|
|
1419
|
-
}
|
|
1420
|
-
async run(accessor) {
|
|
1421
|
-
const debugService = accessor.get(IDebugService);
|
|
1422
|
-
await debugService.enableOrDisableBreakpoints(true);
|
|
1423
|
-
}
|
|
1424
|
-
});
|
|
1425
|
-
registerAction2(class extends Action2 {
|
|
1426
|
-
constructor() {
|
|
1427
|
-
super({
|
|
1428
|
-
id: 'workbench.debug.viewlet.action.disableAllBreakpoints',
|
|
1429
|
-
title: {
|
|
1430
|
-
original: 'Disable All Breakpoints',
|
|
1431
|
-
value: ( localizeWithPath(
|
|
1432
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1433
|
-
'disableAllBreakpoints',
|
|
1434
|
-
"Disable All Breakpoints"
|
|
1435
|
-
)),
|
|
1436
|
-
mnemonicTitle: ( localizeWithPath(
|
|
1437
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1438
|
-
{ key: 'miDisableAllBreakpoints', comment: ['&& denotes a mnemonic'] },
|
|
1439
|
-
"Disable A&&ll Breakpoints"
|
|
1440
|
-
))
|
|
1441
|
-
},
|
|
1442
|
-
f1: true,
|
|
1443
|
-
precondition: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
1444
|
-
menu: [{
|
|
1445
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1446
|
-
group: 'z_commands',
|
|
1447
|
-
order: 20,
|
|
1448
|
-
when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
|
|
1449
|
-
}, {
|
|
1450
|
-
id: MenuId.MenubarDebugMenu,
|
|
1451
|
-
group: '5_breakpoints',
|
|
1452
|
-
order: 2,
|
|
1453
|
-
when: CONTEXT_DEBUGGERS_AVAILABLE
|
|
1454
|
-
}]
|
|
1455
|
-
});
|
|
1456
|
-
}
|
|
1457
|
-
async run(accessor) {
|
|
1458
|
-
const debugService = accessor.get(IDebugService);
|
|
1459
|
-
await debugService.enableOrDisableBreakpoints(false);
|
|
1460
|
-
}
|
|
1461
|
-
});
|
|
1462
|
-
registerAction2(class extends Action2 {
|
|
1463
|
-
constructor() {
|
|
1464
|
-
super({
|
|
1465
|
-
id: 'workbench.debug.viewlet.action.reapplyBreakpointsAction',
|
|
1466
|
-
title: { value: ( localizeWithPath(
|
|
1467
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1468
|
-
'reapplyAllBreakpoints',
|
|
1469
|
-
"Reapply All Breakpoints"
|
|
1470
|
-
)), original: 'Reapply All Breakpoints' },
|
|
1471
|
-
f1: true,
|
|
1472
|
-
precondition: CONTEXT_IN_DEBUG_MODE,
|
|
1473
|
-
menu: [{
|
|
1474
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1475
|
-
group: 'z_commands',
|
|
1476
|
-
order: 30,
|
|
1477
|
-
when: ( ContextKeyExpr.and(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo('exceptionBreakpoint'))))
|
|
1478
|
-
}]
|
|
1479
|
-
});
|
|
1480
|
-
}
|
|
1481
|
-
async run(accessor) {
|
|
1482
|
-
const debugService = accessor.get(IDebugService);
|
|
1483
|
-
await debugService.setBreakpointsActivated(true);
|
|
1484
|
-
}
|
|
1485
|
-
});
|
|
1486
|
-
registerAction2(class extends ViewAction {
|
|
1487
|
-
constructor() {
|
|
1488
|
-
super({
|
|
1489
|
-
id: 'debug.editBreakpoint',
|
|
1490
|
-
viewId: BREAKPOINTS_VIEW_ID,
|
|
1491
|
-
title: ( localizeWithPath(
|
|
1492
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1493
|
-
'editCondition',
|
|
1494
|
-
"Edit Condition..."
|
|
1495
|
-
)),
|
|
1496
|
-
icon: Codicon.edit,
|
|
1497
|
-
precondition: CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,
|
|
1498
|
-
menu: [{
|
|
1499
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1500
|
-
group: 'navigation',
|
|
1501
|
-
order: 10
|
|
1502
|
-
}, {
|
|
1503
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1504
|
-
group: 'inline',
|
|
1505
|
-
order: 10
|
|
1506
|
-
}]
|
|
1507
|
-
});
|
|
1508
|
-
}
|
|
1509
|
-
async runInView(accessor, view, breakpoint) {
|
|
1510
|
-
const debugService = accessor.get(IDebugService);
|
|
1511
|
-
const editorService = accessor.get(IEditorService);
|
|
1512
|
-
if (breakpoint instanceof Breakpoint) {
|
|
1513
|
-
const editor = await openBreakpointSource(breakpoint, false, false, true, debugService, editorService);
|
|
1514
|
-
if (editor) {
|
|
1515
|
-
const codeEditor = editor.getControl();
|
|
1516
|
-
if (isCodeEditor(codeEditor)) {
|
|
1517
|
-
codeEditor.getContribution(BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(breakpoint.lineNumber, breakpoint.column);
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
else if (breakpoint instanceof FunctionBreakpoint) {
|
|
1522
|
-
const contextMenuService = accessor.get(IContextMenuService);
|
|
1523
|
-
const actions = [( new Action('breakpoint.editCondition', ( localizeWithPath(
|
|
1524
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1525
|
-
'editCondition',
|
|
1526
|
-
"Edit Condition..."
|
|
1527
|
-
)), undefined, true, async () => view.renderInputBox({ breakpoint, type: 'condition' }))),
|
|
1528
|
-
( new Action('breakpoint.editCondition', ( localizeWithPath(
|
|
1529
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1530
|
-
'editHitCount',
|
|
1531
|
-
"Edit Hit Count..."
|
|
1532
|
-
)), undefined, true, async () => view.renderInputBox({ breakpoint, type: 'hitCount' })))];
|
|
1533
|
-
const domNode = breakpointIdToActionBarDomeNode.get(breakpoint.getId());
|
|
1534
|
-
if (domNode) {
|
|
1535
|
-
contextMenuService.showContextMenu({
|
|
1536
|
-
getActions: () => actions,
|
|
1537
|
-
getAnchor: () => domNode,
|
|
1538
|
-
onHide: () => dispose(actions)
|
|
1539
|
-
});
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
else {
|
|
1543
|
-
view.renderInputBox({ breakpoint, type: 'condition' });
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
});
|
|
1547
|
-
registerAction2(class extends ViewAction {
|
|
1548
|
-
constructor() {
|
|
1549
|
-
super({
|
|
1550
|
-
id: 'debug.editFunctionBreakpoint',
|
|
1551
|
-
viewId: BREAKPOINTS_VIEW_ID,
|
|
1552
|
-
title: ( localizeWithPath(
|
|
1553
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1554
|
-
'editBreakpoint',
|
|
1555
|
-
"Edit Function Breakpoint..."
|
|
1556
|
-
)),
|
|
1557
|
-
menu: [{
|
|
1558
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1559
|
-
group: '1_breakpoints',
|
|
1560
|
-
order: 10,
|
|
1561
|
-
when: ( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('functionBreakpoint'))
|
|
1562
|
-
}]
|
|
1563
|
-
});
|
|
1564
|
-
}
|
|
1565
|
-
runInView(_accessor, view, breakpoint) {
|
|
1566
|
-
view.renderInputBox({ breakpoint, type: 'name' });
|
|
1567
|
-
}
|
|
1568
|
-
});
|
|
1569
|
-
registerAction2(class extends ViewAction {
|
|
1570
|
-
constructor() {
|
|
1571
|
-
super({
|
|
1572
|
-
id: 'debug.editFunctionBreakpointHitCount',
|
|
1573
|
-
viewId: BREAKPOINTS_VIEW_ID,
|
|
1574
|
-
title: ( localizeWithPath(
|
|
1575
|
-
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1576
|
-
'editHitCount',
|
|
1577
|
-
"Edit Hit Count..."
|
|
1578
|
-
)),
|
|
1579
|
-
precondition: CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,
|
|
1580
|
-
menu: [{
|
|
1581
|
-
id: MenuId.DebugBreakpointsContext,
|
|
1582
|
-
group: 'navigation',
|
|
1583
|
-
order: 20,
|
|
1584
|
-
when: ( ContextKeyExpr.or(( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('functionBreakpoint')), ( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('dataBreakpoint'))))
|
|
1585
|
-
}]
|
|
1586
|
-
});
|
|
1587
|
-
}
|
|
1588
|
-
runInView(_accessor, view, breakpoint) {
|
|
1589
|
-
view.renderInputBox({ breakpoint, type: 'hitCount' });
|
|
1590
|
-
}
|
|
1591
|
-
});
|
|
1592
|
-
|
|
1593
|
-
export { BreakpointsView, getBreakpointMessageAndIcon, getExpandedBodySize, openBreakpointSource };
|