@codingame/monaco-vscode-debug-service-override 1.83.16 → 1.85.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +154 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +39 -28
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +41 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +13 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +8 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +5 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +121 -49
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +51 -24
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +87 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +4 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +4 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +2 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +10 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +17 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +3 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-debug-service-override",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.85.0-next.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.
|
|
22
|
-
"monaco-editor": "0.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "1.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.1",
|
|
22
|
+
"monaco-editor": "0.45.0",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "1.85.0-next.1"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -19,6 +19,7 @@ class LanguageFeaturesService {
|
|
|
19
19
|
this.signatureHelpProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
20
20
|
this.hoverProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
21
21
|
this.documentHighlightProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
22
|
+
this.multiDocumentHighlightProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
22
23
|
this.selectionRangeProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
23
24
|
this.foldingRangeProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
24
25
|
this.linkProvider = ( new LanguageFeatureRegistry(this._score.bind(this)));
|
|
@@ -502,7 +502,7 @@ let BreakpointEditorContribution = class BreakpointEditorContribution {
|
|
|
502
502
|
if (decorations) {
|
|
503
503
|
for (const { options } of decorations) {
|
|
504
504
|
const clz = options.glyphMarginClassName;
|
|
505
|
-
if (clz && (!clz.includes('codicon-') || clz.includes('codicon-testing-') || clz.includes('codicon-merge-') || clz.includes('codicon-arrow-') || clz.includes('codicon-loading') || clz.includes('codicon-fold'))) {
|
|
505
|
+
if (clz && (!clz.includes('codicon-') || clz.includes('codicon-testing-') || clz.includes('codicon-merge-') || clz.includes('codicon-arrow-') || clz.includes('codicon-loading') || clz.includes('codicon-fold') || clz.includes('codicon-inline-chat'))) {
|
|
506
506
|
return false;
|
|
507
507
|
}
|
|
508
508
|
}
|
|
@@ -735,7 +735,7 @@ class InlineBreakpointWidget {
|
|
|
735
735
|
}
|
|
736
736
|
}));
|
|
737
737
|
this.toDispose.push(dom.addDisposableListener(this.domNode, dom.EventType.CONTEXT_MENU, e => {
|
|
738
|
-
const event = ( new StandardMouseEvent(e));
|
|
738
|
+
const event = ( new StandardMouseEvent(dom.getWindow(this.domNode), e));
|
|
739
739
|
const actions = this.getContextMenuActions();
|
|
740
740
|
this.contextMenuService.showContextMenu({
|
|
741
741
|
getAnchor: () => event,
|
|
@@ -89,8 +89,9 @@ let BreakpointsView = class BreakpointsView extends ViewPane {
|
|
|
89
89
|
)),
|
|
90
90
|
( new ExceptionBreakpointInputRenderer(this, this.debugService, this.contextViewService)),
|
|
91
91
|
this.instantiationService.createInstance(FunctionBreakpointsRenderer, this.menu, this.breakpointSupportsCondition, this.breakpointItemType),
|
|
92
|
-
this.instantiationService.createInstance(DataBreakpointsRenderer),
|
|
93
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)),
|
|
94
95
|
this.instantiationService.createInstance(InstructionBreakpointsRenderer),
|
|
95
96
|
], {
|
|
96
97
|
identityProvider: { getId: (element) => element.getId() },
|
|
@@ -121,7 +122,7 @@ let BreakpointsView = class BreakpointsView extends ViewPane {
|
|
|
121
122
|
if (!e.element) {
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
|
-
if (e.browserEvent
|
|
125
|
+
if (dom.isMouseEvent(e.browserEvent) && e.browserEvent.button === 1) {
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
127
128
|
if (e.element instanceof Breakpoint) {
|
|
@@ -129,9 +130,9 @@ let BreakpointsView = class BreakpointsView extends ViewPane {
|
|
|
129
130
|
}
|
|
130
131
|
if (e.element instanceof InstructionBreakpoint) {
|
|
131
132
|
const disassemblyView = await this.editorService.openEditor(DisassemblyViewInput.instance);
|
|
132
|
-
disassemblyView.goToInstructionAndOffset(e.element.instructionReference, e.element.offset, e.browserEvent
|
|
133
|
+
disassemblyView.goToInstructionAndOffset(e.element.instructionReference, e.element.offset, dom.isMouseEvent(e.browserEvent) && e.browserEvent.detail === 2);
|
|
133
134
|
}
|
|
134
|
-
if (e.browserEvent
|
|
135
|
+
if (dom.isMouseEvent(e.browserEvent) && e.browserEvent.detail === 2 && e.element instanceof FunctionBreakpoint && e.element !== this.inputBoxData?.breakpoint) {
|
|
135
136
|
this.renderInputBox({ breakpoint: e.element, type: 'name' });
|
|
136
137
|
}
|
|
137
138
|
}));
|
|
@@ -342,6 +343,10 @@ class BreakpointsDelegate {
|
|
|
342
343
|
return ExceptionBreakpointsRenderer.ID;
|
|
343
344
|
}
|
|
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
|
+
}
|
|
345
350
|
return DataBreakpointsRenderer.ID;
|
|
346
351
|
}
|
|
347
352
|
if (element instanceof InstructionBreakpoint) {
|
|
@@ -515,7 +520,7 @@ let FunctionBreakpointsRenderer = class FunctionBreakpointsRenderer {
|
|
|
515
520
|
data.condition.textContent = ( localizeWithPath(
|
|
516
521
|
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
517
522
|
'expressionAndHitCount',
|
|
518
|
-
"
|
|
523
|
+
"Condition: {0} | Hit Count: {1}",
|
|
519
524
|
functionBreakpoint.condition,
|
|
520
525
|
functionBreakpoint.hitCondition
|
|
521
526
|
));
|
|
@@ -550,7 +555,10 @@ FunctionBreakpointsRenderer = FunctionBreakpointsRenderer_1 = ( __decorate([
|
|
|
550
555
|
], FunctionBreakpointsRenderer));
|
|
551
556
|
let DataBreakpointsRenderer = class DataBreakpointsRenderer {
|
|
552
557
|
static { DataBreakpointsRenderer_1 = this; }
|
|
553
|
-
constructor(debugService, labelService) {
|
|
558
|
+
constructor(menu, breakpointSupportsCondition, breakpointItemType, debugService, labelService) {
|
|
559
|
+
this.menu = menu;
|
|
560
|
+
this.breakpointSupportsCondition = breakpointSupportsCondition;
|
|
561
|
+
this.breakpointItemType = breakpointItemType;
|
|
554
562
|
this.debugService = debugService;
|
|
555
563
|
this.labelService = labelService;
|
|
556
564
|
}
|
|
@@ -571,6 +579,9 @@ let DataBreakpointsRenderer = class DataBreakpointsRenderer {
|
|
|
571
579
|
dom.append(data.breakpoint, data.checkbox);
|
|
572
580
|
data.name = dom.append(data.breakpoint, $('span.name'));
|
|
573
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);
|
|
574
585
|
return data;
|
|
575
586
|
}
|
|
576
587
|
renderElement(dataBreakpoint, _index, data) {
|
|
@@ -597,14 +608,33 @@ let DataBreakpointsRenderer = class DataBreakpointsRenderer {
|
|
|
597
608
|
else {
|
|
598
609
|
data.accessType.textContent = '';
|
|
599
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);
|
|
600
630
|
}
|
|
601
631
|
disposeTemplate(templateData) {
|
|
602
632
|
dispose(templateData.toDispose);
|
|
603
633
|
}
|
|
604
634
|
};
|
|
605
635
|
DataBreakpointsRenderer = DataBreakpointsRenderer_1 = ( __decorate([
|
|
606
|
-
( __param(
|
|
607
|
-
( __param(
|
|
636
|
+
( __param(3, IDebugService)),
|
|
637
|
+
( __param(4, ILabelService))
|
|
608
638
|
], DataBreakpointsRenderer));
|
|
609
639
|
let InstructionBreakpointsRenderer = class InstructionBreakpointsRenderer {
|
|
610
640
|
static { InstructionBreakpointsRenderer_1 = this; }
|
|
@@ -784,6 +814,119 @@ class FunctionBreakpointInputRenderer {
|
|
|
784
814
|
dispose(templateData.toDispose);
|
|
785
815
|
}
|
|
786
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
|
+
}
|
|
787
930
|
class ExceptionBreakpointInputRenderer {
|
|
788
931
|
constructor(view, debugService, contextViewService) {
|
|
789
932
|
this.view = view;
|
|
@@ -986,7 +1129,7 @@ function getBreakpointMessageAndIcon(state, breakpointsActivated, breakpoint$1,
|
|
|
986
1129
|
messages.push(( localizeWithPath(
|
|
987
1130
|
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
988
1131
|
'expression',
|
|
989
|
-
"
|
|
1132
|
+
"Condition: {0}",
|
|
990
1133
|
breakpoint$1.condition
|
|
991
1134
|
)));
|
|
992
1135
|
}
|
|
@@ -1070,7 +1213,7 @@ function getBreakpointMessageAndIcon(state, breakpointsActivated, breakpoint$1,
|
|
|
1070
1213
|
messages.push(( localizeWithPath(
|
|
1071
1214
|
'vs/workbench/contrib/debug/browser/breakpointsView',
|
|
1072
1215
|
'expression',
|
|
1073
|
-
"
|
|
1216
|
+
"Condition: {0}",
|
|
1074
1217
|
breakpoint$1.condition
|
|
1075
1218
|
)));
|
|
1076
1219
|
}
|
|
@@ -1438,7 +1581,7 @@ registerAction2(class extends ViewAction {
|
|
|
1438
1581
|
id: MenuId.DebugBreakpointsContext,
|
|
1439
1582
|
group: 'navigation',
|
|
1440
1583
|
order: 20,
|
|
1441
|
-
when: ( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('functionBreakpoint'))
|
|
1584
|
+
when: ( ContextKeyExpr.or(( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('functionBreakpoint')), ( CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo('dataBreakpoint'))))
|
|
1442
1585
|
}]
|
|
1443
1586
|
});
|
|
1444
1587
|
}
|
|
@@ -36,6 +36,7 @@ import { Repl } from './repl.js';
|
|
|
36
36
|
import { StatusBarColorProvider } from './statusbarColorProvider.js';
|
|
37
37
|
import { VIEW_MEMORY_ID, SET_VARIABLE_ID, COPY_VALUE_ID, COPY_EVALUATE_PATH_ID, ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_IS_READ_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, VariablesView } from './variablesView.js';
|
|
38
38
|
import { WatchExpressionsView, ADD_WATCH_LABEL, ADD_WATCH_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID } from './watchExpressionsView.js';
|
|
39
|
+
import { WelcomeView } from './welcomeView.js';
|
|
39
40
|
import { BREAKPOINT_EDITOR_CONTRIBUTION_ID, EDITOR_CONTRIBUTION_ID, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_DEBUGGERS_AVAILABLE, getStateLabel, CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED, CONTEXT_RESTART_FRAME_SUPPORTED, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_SET_VARIABLE_SUPPORTED, CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT, CONTEXT_SET_EXPRESSION_SUPPORTED, CONTEXT_WATCH_ITEM_TYPE, DEBUG_PANEL_ID, REPL_VIEW_ID, VIEWLET_ID, VARIABLES_VIEW_ID, CONTEXT_DEBUG_UX, WATCH_VIEW_ID, CALLSTACK_VIEW_ID, BREAKPOINTS_VIEW_ID, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_HAS_DEBUGGED, LOADED_SCRIPTS_VIEW_ID, CONTEXT_LOADED_SCRIPTS_SUPPORTED, DISASSEMBLY_VIEW_ID, INTERNAL_CONSOLE_OPTIONS_SCHEMA, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CONTEXT_CAN_VIEW_MEMORY, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
40
41
|
import { DebugContentProvider } from '../common/debugContentProvider.js';
|
|
41
42
|
import { DebugLifecycle } from '../common/debugLifecycle.js';
|
|
@@ -107,11 +108,11 @@ const registerDebugCommandPaletteItem = (id, title, when, precondition) => {
|
|
|
107
108
|
}
|
|
108
109
|
});
|
|
109
110
|
};
|
|
110
|
-
registerDebugCommandPaletteItem(TERMINATE_THREAD_ID,
|
|
111
|
+
registerDebugCommandPaletteItem(TERMINATE_THREAD_ID, ( nls.localize2WithPath(
|
|
111
112
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
112
113
|
'terminateThread',
|
|
113
114
|
"Terminate Thread"
|
|
114
|
-
)),
|
|
115
|
+
)), CONTEXT_IN_DEBUG_MODE);
|
|
115
116
|
registerDebugCommandPaletteItem(STEP_OVER_ID, STEP_OVER_LABEL, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
116
117
|
registerDebugCommandPaletteItem(STEP_INTO_ID, STEP_INTO_LABEL, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
117
118
|
registerDebugCommandPaletteItem(STEP_INTO_TARGET_ID, STEP_INTO_TARGET_LABEL, CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.and(CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')))));
|
|
@@ -119,29 +120,29 @@ registerDebugCommandPaletteItem(STEP_OUT_ID, STEP_OUT_LABEL, CONTEXT_IN_DEBUG_MO
|
|
|
119
120
|
registerDebugCommandPaletteItem(PAUSE_ID, PAUSE_LABEL, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('running')));
|
|
120
121
|
registerDebugCommandPaletteItem(STOP_ID, STOP_LABEL, CONTEXT_IN_DEBUG_MODE, ( ContextKeyExpr.or(( CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()), CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)));
|
|
121
122
|
registerDebugCommandPaletteItem(CONTINUE_ID, CONTINUE_LABEL, CONTEXT_IN_DEBUG_MODE, ( CONTEXT_DEBUG_STATE.isEqualTo('stopped')));
|
|
122
|
-
registerDebugCommandPaletteItem(FOCUS_REPL_ID,
|
|
123
|
+
registerDebugCommandPaletteItem(FOCUS_REPL_ID, ( nls.localize2WithPath(
|
|
123
124
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
124
125
|
{ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugFocusConsole' },
|
|
125
126
|
"Focus on Debug Console View"
|
|
126
|
-
))
|
|
127
|
-
registerDebugCommandPaletteItem(JUMP_TO_CURSOR_ID,
|
|
127
|
+
)));
|
|
128
|
+
registerDebugCommandPaletteItem(JUMP_TO_CURSOR_ID, ( nls.localize2WithPath(
|
|
128
129
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
129
130
|
'jumpToCursor',
|
|
130
131
|
"Jump to Cursor"
|
|
131
|
-
)),
|
|
132
|
-
registerDebugCommandPaletteItem(JUMP_TO_CURSOR_ID,
|
|
132
|
+
)), CONTEXT_JUMP_TO_CURSOR_SUPPORTED);
|
|
133
|
+
registerDebugCommandPaletteItem(JUMP_TO_CURSOR_ID, ( nls.localize2WithPath(
|
|
133
134
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
134
135
|
'SetNextStatement',
|
|
135
136
|
"Set Next Statement"
|
|
136
|
-
)),
|
|
137
|
-
registerDebugCommandPaletteItem(RunToCursorAction.ID,
|
|
138
|
-
registerDebugCommandPaletteItem(SelectionToReplAction.ID,
|
|
139
|
-
registerDebugCommandPaletteItem(SelectionToWatchExpressionsAction.ID,
|
|
140
|
-
registerDebugCommandPaletteItem(TOGGLE_INLINE_BREAKPOINT_ID,
|
|
137
|
+
)), CONTEXT_JUMP_TO_CURSOR_SUPPORTED);
|
|
138
|
+
registerDebugCommandPaletteItem(RunToCursorAction.ID, RunToCursorAction.LABEL, CONTEXT_DEBUGGERS_AVAILABLE);
|
|
139
|
+
registerDebugCommandPaletteItem(SelectionToReplAction.ID, SelectionToReplAction.LABEL, CONTEXT_IN_DEBUG_MODE);
|
|
140
|
+
registerDebugCommandPaletteItem(SelectionToWatchExpressionsAction.ID, SelectionToWatchExpressionsAction.LABEL);
|
|
141
|
+
registerDebugCommandPaletteItem(TOGGLE_INLINE_BREAKPOINT_ID, ( nls.localize2WithPath(
|
|
141
142
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
142
143
|
'inlineBreakpoint',
|
|
143
144
|
"Inline Breakpoint"
|
|
144
|
-
))
|
|
145
|
+
)));
|
|
145
146
|
registerDebugCommandPaletteItem(SELECT_AND_START_ID, SELECT_AND_START_LABEL, ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 ))))));
|
|
146
147
|
registerDebugCommandPaletteItem(NEXT_DEBUG_CONSOLE_ID, NEXT_DEBUG_CONSOLE_LABEL);
|
|
147
148
|
registerDebugCommandPaletteItem(PREV_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL);
|
|
@@ -257,11 +258,11 @@ registerDebugViewMenuItem(MenuId.DebugWatchContext, REMOVE_EXPRESSION_COMMAND_ID
|
|
|
257
258
|
"Remove Expression"
|
|
258
259
|
)), 20, ( CONTEXT_WATCH_ITEM_TYPE.isEqualTo('expression')), undefined, 'inline', watchExpressionRemove);
|
|
259
260
|
registerDebugViewMenuItem(MenuId.DebugWatchContext, REMOVE_WATCH_EXPRESSIONS_COMMAND_ID, REMOVE_WATCH_EXPRESSIONS_LABEL, 20, undefined, undefined, 'z_commands');
|
|
260
|
-
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { submenu: MenuId.EditorTitleRun, rememberDefaultAction: true, title:
|
|
261
|
+
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { submenu: MenuId.EditorTitleRun, rememberDefaultAction: true, title: ( nls.localize2WithPath(
|
|
261
262
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
262
263
|
'run',
|
|
263
264
|
"Run or Debug..."
|
|
264
|
-
)),
|
|
265
|
+
)), icon: debugRun, group: 'navigation', order: -1 });
|
|
265
266
|
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
266
267
|
submenu: MenuId.MenubarDebugMenu,
|
|
267
268
|
title: {
|
|
@@ -290,11 +291,11 @@ MenuRegistry.appendMenuItem(MenuId.MenubarNewBreakpointMenu, {
|
|
|
290
291
|
});
|
|
291
292
|
const VIEW_CONTAINER = ( Registry.as(Extensions$2.ViewContainersRegistry)).registerViewContainer({
|
|
292
293
|
id: DEBUG_PANEL_ID,
|
|
293
|
-
title:
|
|
294
|
+
title: ( nls.localize2WithPath(
|
|
294
295
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
295
296
|
{ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugPanel' },
|
|
296
297
|
"Debug Console"
|
|
297
|
-
)),
|
|
298
|
+
)),
|
|
298
299
|
icon: debugConsoleViewIcon,
|
|
299
300
|
ctorDescriptor: ( new SyncDescriptor(
|
|
300
301
|
ViewPaneContainer,
|
|
@@ -306,7 +307,7 @@ const VIEW_CONTAINER = ( Registry.as(Extensions$2.ViewContainersRegistry)).regis
|
|
|
306
307
|
}, 1 , { doNotRegisterOpenCommand: true });
|
|
307
308
|
( Registry.as(Extensions$2.ViewsRegistry)).registerViews([{
|
|
308
309
|
id: REPL_VIEW_ID,
|
|
309
|
-
name: ( nls.
|
|
310
|
+
name: ( nls.localize2WithPath(
|
|
310
311
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
311
312
|
{ comment: ['Debug is a noun in this context, not a verb.'], key: 'debugPanel' },
|
|
312
313
|
"Debug Console"
|
|
@@ -329,11 +330,11 @@ const VIEW_CONTAINER = ( Registry.as(Extensions$2.ViewContainersRegistry)).regis
|
|
|
329
330
|
}], VIEW_CONTAINER);
|
|
330
331
|
const viewContainer = ( Registry.as(Extensions$2.ViewContainersRegistry)).registerViewContainer({
|
|
331
332
|
id: VIEWLET_ID,
|
|
332
|
-
title:
|
|
333
|
+
title: ( nls.localize2WithPath(
|
|
333
334
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
334
335
|
'run and debug',
|
|
335
336
|
"Run and Debug"
|
|
336
|
-
)),
|
|
337
|
+
)),
|
|
337
338
|
openCommandActionDescriptor: {
|
|
338
339
|
id: VIEWLET_ID,
|
|
339
340
|
mnemonicTitle: ( nls.localizeWithPath(
|
|
@@ -350,23 +351,24 @@ const viewContainer = ( Registry.as(Extensions$2.ViewContainersRegistry)).regist
|
|
|
350
351
|
order: 3,
|
|
351
352
|
}, 0 );
|
|
352
353
|
const viewsRegistry = ( Registry.as(Extensions$2.ViewsRegistry));
|
|
353
|
-
viewsRegistry.registerViews([{ id: VARIABLES_VIEW_ID, name: ( nls.
|
|
354
|
+
viewsRegistry.registerViews([{ id: VARIABLES_VIEW_ID, name: ( nls.localize2WithPath(
|
|
354
355
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
355
356
|
'variables',
|
|
356
357
|
"Variables"
|
|
357
358
|
)), containerIcon: variablesViewIcon, ctorDescriptor: ( new SyncDescriptor(VariablesView)), order: 10, weight: 40, canToggleVisibility: true, canMoveView: true, focusCommand: { id: 'workbench.debug.action.focusVariablesView' }, when: ( CONTEXT_DEBUG_UX.isEqualTo('default')) }], viewContainer);
|
|
358
|
-
viewsRegistry.registerViews([{ id: WATCH_VIEW_ID, name: ( nls.
|
|
359
|
-
viewsRegistry.registerViews([{ id: CALLSTACK_VIEW_ID, name: ( nls.
|
|
359
|
+
viewsRegistry.registerViews([{ id: WATCH_VIEW_ID, name: ( nls.localize2WithPath('vs/workbench/contrib/debug/browser/debug.contribution', 'watch', "Watch")), containerIcon: watchViewIcon, ctorDescriptor: ( new SyncDescriptor(WatchExpressionsView)), order: 20, weight: 10, canToggleVisibility: true, canMoveView: true, focusCommand: { id: 'workbench.debug.action.focusWatchView' }, when: ( CONTEXT_DEBUG_UX.isEqualTo('default')) }], viewContainer);
|
|
360
|
+
viewsRegistry.registerViews([{ id: CALLSTACK_VIEW_ID, name: ( nls.localize2WithPath(
|
|
360
361
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
361
362
|
'callStack',
|
|
362
363
|
"Call Stack"
|
|
363
364
|
)), containerIcon: callStackViewIcon, ctorDescriptor: ( new SyncDescriptor(CallStackView)), order: 30, weight: 30, canToggleVisibility: true, canMoveView: true, focusCommand: { id: 'workbench.debug.action.focusCallStackView' }, when: ( CONTEXT_DEBUG_UX.isEqualTo('default')) }], viewContainer);
|
|
364
|
-
viewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: ( nls.
|
|
365
|
+
viewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: ( nls.localize2WithPath(
|
|
365
366
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
366
367
|
'breakpoints',
|
|
367
368
|
"Breakpoints"
|
|
368
369
|
)), containerIcon: breakpointsViewIcon, ctorDescriptor: ( new SyncDescriptor(BreakpointsView)), order: 40, weight: 20, canToggleVisibility: true, canMoveView: true, focusCommand: { id: 'workbench.debug.action.focusBreakpointsView' }, when: ( ContextKeyExpr.or(CONTEXT_BREAKPOINTS_EXIST, ( CONTEXT_DEBUG_UX.isEqualTo('default')), CONTEXT_HAS_DEBUGGED)) }], viewContainer);
|
|
369
|
-
viewsRegistry.registerViews([{ id:
|
|
370
|
+
viewsRegistry.registerViews([{ id: WelcomeView.ID, name: WelcomeView.LABEL, containerIcon: runViewIcon, ctorDescriptor: ( new SyncDescriptor(WelcomeView)), order: 1, weight: 40, canToggleVisibility: true, when: ( CONTEXT_DEBUG_UX.isEqualTo('simple')) }], viewContainer);
|
|
371
|
+
viewsRegistry.registerViews([{ id: LOADED_SCRIPTS_VIEW_ID, name: ( nls.localize2WithPath(
|
|
370
372
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
371
373
|
'loadedScripts',
|
|
372
374
|
"Loaded Scripts"
|
|
@@ -438,8 +440,7 @@ configurationRegistry.registerConfiguration({
|
|
|
438
440
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
439
441
|
{ comment: ['This is the description for a setting'], key: 'toolBarLocation' },
|
|
440
442
|
"Controls the location of the debug toolbar. Either `floating` in all views, `docked` in the debug view, `commandCenter` (requires `{0}`), or `hidden`.",
|
|
441
|
-
'#window.commandCenter#'
|
|
442
|
-
'#window.titleBarStyle#'
|
|
443
|
+
'#window.commandCenter#'
|
|
443
444
|
)),
|
|
444
445
|
default: 'floating',
|
|
445
446
|
markdownEnumDescriptions: [
|
|
@@ -731,9 +732,19 @@ configurationRegistry.registerConfiguration({
|
|
|
731
732
|
description: ( nls.localizeWithPath(
|
|
732
733
|
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
733
734
|
'debug.enableStatusBarColor',
|
|
734
|
-
"Color
|
|
735
|
+
"Color of the Status bar when debugger is active."
|
|
735
736
|
)),
|
|
736
737
|
default: true
|
|
738
|
+
},
|
|
739
|
+
'debug.hideLauncherWhileDebugging': {
|
|
740
|
+
type: 'boolean',
|
|
741
|
+
markdownDescription: ( nls.localizeWithPath(
|
|
742
|
+
'vs/workbench/contrib/debug/browser/debug.contribution',
|
|
743
|
+
{ comment: ['This is the description for a setting'], key: 'debug.hideLauncherWhileDebugging' },
|
|
744
|
+
"Hide 'Start Debugging' control in title bar of 'Run and Debug' view while debugging is active. Only relevant when `{0}` is not `docked`.",
|
|
745
|
+
'#debug.toolBarLocation#'
|
|
746
|
+
)),
|
|
747
|
+
default: false
|
|
737
748
|
}
|
|
738
749
|
}
|
|
739
750
|
});
|
|
@@ -310,7 +310,7 @@ let AdapterManager = class AdapterManager extends Disposable {
|
|
|
310
310
|
await this.activateDebuggers('onDebugInitialConfigurations');
|
|
311
311
|
candidates = this.debuggers
|
|
312
312
|
.filter(a => a.enabled)
|
|
313
|
-
.filter(dbg => dbg.hasInitialConfiguration() || dbg.hasConfigurationProvider());
|
|
313
|
+
.filter(dbg => dbg.hasInitialConfiguration() || dbg.hasDynamicConfigurationProviders() || dbg.hasConfigurationProvider());
|
|
314
314
|
}
|
|
315
315
|
if (candidates.length === 0 && languageLabel) {
|
|
316
316
|
if (languageLabel.indexOf(' ') >= 0) {
|
|
@@ -2,17 +2,17 @@ import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
|
2
2
|
import { List } from 'monaco-editor/esm/vs/base/browser/ui/list/listWidget.js';
|
|
3
3
|
import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
|
|
4
4
|
import { IListService } from 'monaco-editor/esm/vs/platform/list/browser/listService.js';
|
|
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 } 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_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';
|
|
6
6
|
import { Expression, Variable, Breakpoint, FunctionBreakpoint, DataBreakpoint } from '../common/debugModel.js';
|
|
7
7
|
import { isCodeEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
|
|
8
|
-
import { MenuRegistry, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
8
|
+
import { MenuRegistry, MenuId, registerAction2, Action2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
9
9
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
10
10
|
import { EditorContextKeys } from 'monaco-editor/esm/vs/editor/common/editorContextKeys.js';
|
|
11
11
|
import { IContextKeyService, ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
12
12
|
import { openBreakpointSource } from './breakpointsView.js';
|
|
13
13
|
import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
14
14
|
import { InputFocusedContext } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js';
|
|
15
|
-
import { PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
15
|
+
import { ResourceContextKey, ActiveEditorContext, PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
16
16
|
import { CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
17
17
|
import { ITextResourcePropertiesService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
18
18
|
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
@@ -22,6 +22,7 @@ import { IViewsService } from 'vscode/vscode/vs/workbench/common/views';
|
|
|
22
22
|
import { isWeb, isWindows } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
23
23
|
import { showLoadedScriptMenu } from '../common/loadedScriptsPicker.js';
|
|
24
24
|
import { showDebugSessionMenu } from './debugSessionPicker.js';
|
|
25
|
+
import { TEXT_FILE_EDITOR_ID } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
|
|
25
26
|
|
|
26
27
|
const ADD_CONFIGURATION_ID = 'debug.addConfiguration';
|
|
27
28
|
const TOGGLE_INLINE_BREAKPOINT_ID = 'editor.debug.action.toggleInlineBreakpoint';
|
|
@@ -117,6 +118,11 @@ const DEBUG_CONFIGURE_LABEL = ( nls.localizeWithPath(
|
|
|
117
118
|
"Open '{0}'",
|
|
118
119
|
'launch.json'
|
|
119
120
|
));
|
|
121
|
+
const DEBUG_START_LABEL = { value: ( nls.localizeWithPath(
|
|
122
|
+
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
123
|
+
'startDebug',
|
|
124
|
+
"Start Debugging"
|
|
125
|
+
)), original: 'Start Debugging' };
|
|
120
126
|
const NEXT_DEBUG_CONSOLE_LABEL = { value: ( nls.localizeWithPath(
|
|
121
127
|
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
122
128
|
'nextDebugConsole',
|
|
@@ -879,6 +885,37 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
879
885
|
}
|
|
880
886
|
}
|
|
881
887
|
});
|
|
888
|
+
registerAction2(class AddConfigurationAction extends Action2 {
|
|
889
|
+
constructor() {
|
|
890
|
+
super({
|
|
891
|
+
id: ADD_CONFIGURATION_ID,
|
|
892
|
+
title: { value: ( nls.localizeWithPath(
|
|
893
|
+
'vs/workbench/contrib/debug/browser/debugCommands',
|
|
894
|
+
'addConfiguration',
|
|
895
|
+
"Add Configuration..."
|
|
896
|
+
)), original: 'Add Configuration...' },
|
|
897
|
+
category: DEBUG_COMMAND_CATEGORY,
|
|
898
|
+
f1: true,
|
|
899
|
+
menu: {
|
|
900
|
+
id: MenuId.EditorContent,
|
|
901
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.regex(ResourceContextKey.Path.key, /\.vscode[/\\]launch\.json$/)), ( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID))))
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
async run(accessor, launchUri) {
|
|
906
|
+
const manager = accessor.get(IDebugService).getConfigurationManager();
|
|
907
|
+
const launch = manager.getLaunches().find(l => ( l.uri.toString()) === launchUri) || manager.selectedConfiguration.launch;
|
|
908
|
+
if (launch) {
|
|
909
|
+
const { editor, created } = await launch.openConfigFile({ preserveFocus: false });
|
|
910
|
+
if (editor && !created) {
|
|
911
|
+
const codeEditor = editor.getControl();
|
|
912
|
+
if (codeEditor) {
|
|
913
|
+
await codeEditor.getContribution(EDITOR_CONTRIBUTION_ID)?.addLaunchConfiguration();
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
});
|
|
882
919
|
const inlineBreakpointHandler = (accessor) => {
|
|
883
920
|
const debugService = accessor.get(IDebugService);
|
|
884
921
|
const editorService = accessor.get(IEditorService);
|
|
@@ -937,4 +974,4 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
937
974
|
}
|
|
938
975
|
});
|
|
939
976
|
|
|
940
|
-
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, 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 };
|
|
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 };
|
|
@@ -203,6 +203,7 @@ let ConfigurationManager = class ConfigurationManager {
|
|
|
203
203
|
await this.selectConfiguration(launch, config.name);
|
|
204
204
|
this.removeRecentDynamicConfigurations(config.name, config.type);
|
|
205
205
|
}));
|
|
206
|
+
disposables.add(input.onDidHide(() => resolve(undefined)));
|
|
206
207
|
}));
|
|
207
208
|
const nestedPicks = await Promise.all(picks);
|
|
208
209
|
const items = flatten(nestedPicks);
|