@codingame/monaco-vscode-debug-service-override 9.0.2 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +160 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +22 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +133 -136
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +12 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +12 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +23 -26
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +35 -36
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +21 -28
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +29 -42
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +10 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +1 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +11 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +55 -67
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +58 -58
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +3 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +5 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +35 -42
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +1 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +17 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +13 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +12 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +66 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +12 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +4 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +2 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +40 -45
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +20 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +5 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +39 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +34 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +9 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +44 -44
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +24 -24
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +5 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
|
@@ -15,7 +15,6 @@ import { MenuId, registerAction2 } from 'vscode/vscode/vs/platform/actions/commo
|
|
|
15
15
|
import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
|
|
16
16
|
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
17
17
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
18
|
-
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
19
18
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
20
19
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
21
20
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -26,23 +25,22 @@ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/
|
|
|
26
25
|
import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
27
26
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
28
27
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
29
|
-
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
30
28
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
31
29
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
32
30
|
import { ViewPane, ViewAction } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
33
31
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
32
|
+
import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
33
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
34
|
+
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
35
|
+
import { IExtensionsWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
36
|
+
import { CONTEXT_VARIABLES_FOCUSED, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED, VARIABLES_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
38
37
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
39
38
|
import { getContextForVariable } from '../common/debugContext.js';
|
|
40
39
|
import { Variable, VisualizedExpression, Expression, StackFrame, ErrorScope, Scope, getUriForDebugMemory } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
41
40
|
import { IDebugVisualizerService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugVisualizers.service';
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
41
|
+
import { renderViewTree, AbstractExpressionDataSource, AbstractExpressionsRenderer } from './baseDebugView.js';
|
|
42
|
+
import { COPY_VALUE_LABEL, COPY_VALUE_ID, COPY_EVALUATE_PATH_LABEL, COPY_EVALUATE_PATH_ID, ADD_TO_WATCH_LABEL, ADD_TO_WATCH_ID } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
|
|
43
|
+
import { DebugExpressionRenderer } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugExpressionRenderer';
|
|
46
44
|
|
|
47
45
|
var VisualizedVariableRenderer_1, VariablesRenderer_1;
|
|
48
46
|
const $ = $$1;
|
|
@@ -83,10 +81,10 @@ let VariablesView = class VariablesView extends ViewPane {
|
|
|
83
81
|
this.element.classList.add('debug-pane');
|
|
84
82
|
container.classList.add('debug-variables');
|
|
85
83
|
const treeContainer = renderViewTree(container);
|
|
86
|
-
const
|
|
84
|
+
const expressionRenderer = this.instantiationService.createInstance(DebugExpressionRenderer);
|
|
87
85
|
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, ( (new VariablesDelegate())), [
|
|
88
|
-
this.instantiationService.createInstance(VariablesRenderer,
|
|
89
|
-
this.instantiationService.createInstance(VisualizedVariableRenderer,
|
|
86
|
+
this.instantiationService.createInstance(VariablesRenderer, expressionRenderer),
|
|
87
|
+
this.instantiationService.createInstance(VisualizedVariableRenderer, expressionRenderer),
|
|
90
88
|
( (new ScopesRenderer())),
|
|
91
89
|
( (new ScopeErrorRenderer())),
|
|
92
90
|
], this.instantiationService.createInstance(VariablesDataSource), {
|
|
@@ -333,9 +331,9 @@ let VisualizedVariableRenderer = class VisualizedVariableRenderer extends Abstra
|
|
|
333
331
|
tree.updateChildren(parent, false, false);
|
|
334
332
|
});
|
|
335
333
|
}
|
|
336
|
-
constructor(
|
|
334
|
+
constructor(expressionRenderer, debugService, contextViewService, hoverService, menuService, contextKeyService) {
|
|
337
335
|
super(debugService, contextViewService, hoverService);
|
|
338
|
-
this.
|
|
336
|
+
this.expressionRenderer = expressionRenderer;
|
|
339
337
|
this.menuService = menuService;
|
|
340
338
|
this.contextKeyService = contextKeyService;
|
|
341
339
|
}
|
|
@@ -353,18 +351,18 @@ let VisualizedVariableRenderer = class VisualizedVariableRenderer extends Abstra
|
|
|
353
351
|
text += ':';
|
|
354
352
|
}
|
|
355
353
|
data.label.set(text, highlights, viz.name);
|
|
356
|
-
|
|
354
|
+
data.elementDisposable.add(this.expressionRenderer.renderValue(data.value, viz, {
|
|
357
355
|
showChanged: false,
|
|
358
356
|
maxValueLength: 1024,
|
|
359
357
|
colorize: true,
|
|
360
|
-
|
|
361
|
-
}
|
|
358
|
+
session: expression.getSession(),
|
|
359
|
+
}));
|
|
362
360
|
}
|
|
363
361
|
getInputBoxOptions(expression) {
|
|
364
362
|
const viz = expression;
|
|
365
363
|
return {
|
|
366
364
|
initialValue: expression.value,
|
|
367
|
-
ariaLabel: ( localize(
|
|
365
|
+
ariaLabel: ( localize(6087, "Type new variable value")),
|
|
368
366
|
validationOptions: {
|
|
369
367
|
validation: () => viz.errorMessage ? ({ content: viz.errorMessage }) : null
|
|
370
368
|
},
|
|
@@ -387,7 +385,7 @@ let VisualizedVariableRenderer = class VisualizedVariableRenderer extends Abstra
|
|
|
387
385
|
const primary = [];
|
|
388
386
|
createAndFillInContextMenuActions(menu, { primary, secondary: [] }, 'inline');
|
|
389
387
|
if (viz.original) {
|
|
390
|
-
const action = ( (new Action('debugViz', ( localize(
|
|
388
|
+
const action = ( (new Action('debugViz', ( localize(6088, 'Remove Visualizer')), ThemeIcon.asClassName(Codicon.eye), true, () => this.debugService.getViewModel().setVisualizedExpression(viz.original, undefined))));
|
|
391
389
|
action.checked = true;
|
|
392
390
|
primary.push(action);
|
|
393
391
|
actionBar.domNode.style.display = 'initial';
|
|
@@ -407,37 +405,32 @@ VisualizedVariableRenderer = VisualizedVariableRenderer_1 = ( (__decorate([
|
|
|
407
405
|
let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRenderer {
|
|
408
406
|
static { VariablesRenderer_1 = this; }
|
|
409
407
|
static { this.ID = 'variable'; }
|
|
410
|
-
constructor(
|
|
408
|
+
constructor(expressionRenderer, menuService, contextKeyService, visualization, contextMenuService, debugService, contextViewService, hoverService) {
|
|
411
409
|
super(debugService, contextViewService, hoverService);
|
|
412
|
-
this.
|
|
410
|
+
this.expressionRenderer = expressionRenderer;
|
|
413
411
|
this.menuService = menuService;
|
|
414
412
|
this.contextKeyService = contextKeyService;
|
|
415
413
|
this.visualization = visualization;
|
|
416
414
|
this.contextMenuService = contextMenuService;
|
|
417
|
-
this.commandService = commandService;
|
|
418
|
-
this.configurationService = configurationService;
|
|
419
415
|
}
|
|
420
416
|
get templateId() {
|
|
421
417
|
return VariablesRenderer_1.ID;
|
|
422
418
|
}
|
|
423
419
|
renderExpression(expression, data, highlights) {
|
|
424
|
-
|
|
425
|
-
|
|
420
|
+
data.elementDisposable.add(this.expressionRenderer.renderVariable(data, expression, {
|
|
421
|
+
highlights,
|
|
422
|
+
showChanged: true,
|
|
423
|
+
}));
|
|
426
424
|
}
|
|
427
425
|
renderElement(node, index, data) {
|
|
428
426
|
data.elementDisposable.clear();
|
|
429
|
-
data.elementDisposable.add(this.configurationService.onDidChangeConfiguration(e => {
|
|
430
|
-
if (e.affectsConfiguration('debug.showVariableTypes')) {
|
|
431
|
-
super.renderExpressionElement(node.element, node, data);
|
|
432
|
-
}
|
|
433
|
-
}));
|
|
434
427
|
super.renderExpressionElement(node.element, node, data);
|
|
435
428
|
}
|
|
436
429
|
getInputBoxOptions(expression) {
|
|
437
430
|
const variable = expression;
|
|
438
431
|
return {
|
|
439
432
|
initialValue: expression.value,
|
|
440
|
-
ariaLabel: ( localize(
|
|
433
|
+
ariaLabel: ( localize(6087, "Type new variable value")),
|
|
441
434
|
validationOptions: {
|
|
442
435
|
validation: () => variable.errorMessage ? ({ content: variable.errorMessage }) : null
|
|
443
436
|
},
|
|
@@ -481,7 +474,7 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
|
|
|
481
474
|
actionBar.push(actions[0], { icon: true, label: false });
|
|
482
475
|
}
|
|
483
476
|
else {
|
|
484
|
-
actionBar.push(( (new Action('debugViz', ( localize(
|
|
477
|
+
actionBar.push(( (new Action('debugViz', ( localize(6089, 'Visualize Variable...')), ThemeIcon.asClassName(Codicon.eye), undefined, () => this.pickVisualizer(actions, originalExpression, data)))), { icon: true, label: false });
|
|
485
478
|
}
|
|
486
479
|
});
|
|
487
480
|
}
|
|
@@ -497,7 +490,7 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
|
|
|
497
490
|
if (token.isCancellationRequested) {
|
|
498
491
|
return;
|
|
499
492
|
}
|
|
500
|
-
if (resolved.type ===
|
|
493
|
+
if (resolved.type === 0 ) {
|
|
501
494
|
viz.execute();
|
|
502
495
|
}
|
|
503
496
|
else {
|
|
@@ -514,22 +507,20 @@ VariablesRenderer = VariablesRenderer_1 = ( (__decorate([
|
|
|
514
507
|
( (__param(2, IContextKeyService))),
|
|
515
508
|
( (__param(3, IDebugVisualizerService))),
|
|
516
509
|
( (__param(4, IContextMenuService))),
|
|
517
|
-
( (__param(5,
|
|
518
|
-
( (__param(6,
|
|
519
|
-
( (__param(7,
|
|
520
|
-
( (__param(8, IHoverService))),
|
|
521
|
-
( (__param(9, IConfigurationService)))
|
|
510
|
+
( (__param(5, IDebugService))),
|
|
511
|
+
( (__param(6, IContextViewService))),
|
|
512
|
+
( (__param(7, IHoverService)))
|
|
522
513
|
], VariablesRenderer)));
|
|
523
514
|
class VariablesAccessibilityProvider {
|
|
524
515
|
getWidgetAriaLabel() {
|
|
525
|
-
return ( localize(
|
|
516
|
+
return ( localize(6090, "Debug Variables"));
|
|
526
517
|
}
|
|
527
518
|
getAriaLabel(element) {
|
|
528
519
|
if (element instanceof Scope) {
|
|
529
|
-
return ( localize(
|
|
520
|
+
return ( localize(6091, "Scope {0}", element.name));
|
|
530
521
|
}
|
|
531
522
|
if (element instanceof Variable) {
|
|
532
|
-
return ( localize(
|
|
523
|
+
return ( localize(6092, "{0}, value {1}", element.name, element.value));
|
|
533
524
|
}
|
|
534
525
|
return null;
|
|
535
526
|
}
|
|
@@ -632,9 +623,9 @@ CommandsRegistry.registerCommand({
|
|
|
632
623
|
async function tryInstallHexEditor(extensionsWorkbenchService, notificationService) {
|
|
633
624
|
try {
|
|
634
625
|
await extensionsWorkbenchService.install(HEX_EDITOR_EXTENSION_ID, {
|
|
635
|
-
justification: ( localize(
|
|
626
|
+
justification: ( localize(6093, "Inspecting binary data requires this extension.")),
|
|
636
627
|
enable: true
|
|
637
|
-
},
|
|
628
|
+
}, 15 );
|
|
638
629
|
return true;
|
|
639
630
|
}
|
|
640
631
|
catch (error) {
|
|
@@ -648,7 +639,7 @@ CommandsRegistry.registerCommand({
|
|
|
648
639
|
handler: async (accessor) => {
|
|
649
640
|
const debugService = accessor.get(IDebugService);
|
|
650
641
|
if (dataBreakpointInfoResponse) {
|
|
651
|
-
await debugService.addDataBreakpoint({ description: dataBreakpointInfoResponse.description, src: { type:
|
|
642
|
+
await debugService.addDataBreakpoint({ description: dataBreakpointInfoResponse.description, src: { type: 0 , dataId: dataBreakpointInfoResponse.dataId }, canPersist: !!dataBreakpointInfoResponse.canPersist, accessTypes: dataBreakpointInfoResponse.accessTypes, accessType: 'write' });
|
|
652
643
|
}
|
|
653
644
|
}
|
|
654
645
|
});
|
|
@@ -658,7 +649,7 @@ CommandsRegistry.registerCommand({
|
|
|
658
649
|
handler: async (accessor) => {
|
|
659
650
|
const debugService = accessor.get(IDebugService);
|
|
660
651
|
if (dataBreakpointInfoResponse) {
|
|
661
|
-
await debugService.addDataBreakpoint({ description: dataBreakpointInfoResponse.description, src: { type:
|
|
652
|
+
await debugService.addDataBreakpoint({ description: dataBreakpointInfoResponse.description, src: { type: 0 , dataId: dataBreakpointInfoResponse.dataId }, canPersist: !!dataBreakpointInfoResponse.canPersist, accessTypes: dataBreakpointInfoResponse.accessTypes, accessType: 'readWrite' });
|
|
662
653
|
}
|
|
663
654
|
}
|
|
664
655
|
});
|
|
@@ -668,7 +659,7 @@ CommandsRegistry.registerCommand({
|
|
|
668
659
|
handler: async (accessor) => {
|
|
669
660
|
const debugService = accessor.get(IDebugService);
|
|
670
661
|
if (dataBreakpointInfoResponse) {
|
|
671
|
-
await debugService.addDataBreakpoint({ description: dataBreakpointInfoResponse.description, src: { type:
|
|
662
|
+
await debugService.addDataBreakpoint({ description: dataBreakpointInfoResponse.description, src: { type: 0 , dataId: dataBreakpointInfoResponse.dataId }, canPersist: !!dataBreakpointInfoResponse.canPersist, accessTypes: dataBreakpointInfoResponse.accessTypes, accessType: 'read' });
|
|
672
663
|
}
|
|
673
664
|
}
|
|
674
665
|
});
|
|
@@ -697,7 +688,7 @@ registerAction2(class extends ViewAction {
|
|
|
697
688
|
super({
|
|
698
689
|
id: 'variables.collapse',
|
|
699
690
|
viewId: VARIABLES_VIEW_ID,
|
|
700
|
-
title: ( localize(
|
|
691
|
+
title: ( localize(6094, "Collapse All")),
|
|
701
692
|
f1: false,
|
|
702
693
|
icon: Codicon.collapseAll,
|
|
703
694
|
menu: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import {
|
|
3
|
-
import { ElementsDragAndDropData, ListViewTargetSector } from 'vscode/vscode/vs/base/browser/ui/list/listView';
|
|
2
|
+
import { ElementsDragAndDropData } from 'vscode/vscode/vs/base/browser/ui/list/listView';
|
|
4
3
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
5
4
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
6
5
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
@@ -20,13 +19,13 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
|
|
|
20
19
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
21
20
|
import { ViewPane, ViewAction } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
22
21
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
23
|
-
import { renderViewTree, AbstractExpressionDataSource, AbstractExpressionsRenderer, renderExpressionValue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
24
|
-
import { watchExpressionsAdd, watchExpressionsRemoveAll } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
25
|
-
import { LinkDetector } from 'vscode/vscode/vs/workbench/contrib/debug/browser/linkDetector';
|
|
26
|
-
import { VariablesRenderer, VisualizedVariableRenderer } from './variablesView.js';
|
|
27
22
|
import { CONTEXT_WATCH_EXPRESSIONS_EXIST, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_ITEM_TYPE, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_CAN_VIEW_MEMORY, WATCH_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
28
23
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
29
24
|
import { Expression, Variable, VisualizedExpression } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
25
|
+
import { renderViewTree, AbstractExpressionDataSource, AbstractExpressionsRenderer } from './baseDebugView.js';
|
|
26
|
+
import { DebugExpressionRenderer } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugExpressionRenderer';
|
|
27
|
+
import { watchExpressionsAdd, watchExpressionsRemoveAll } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
28
|
+
import { VariablesRenderer, VisualizedVariableRenderer } from './variablesView.js';
|
|
30
29
|
|
|
31
30
|
var WatchExpressionsRenderer_1;
|
|
32
31
|
const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
|
@@ -47,18 +46,18 @@ let WatchExpressionsView = class WatchExpressionsView extends ViewPane {
|
|
|
47
46
|
this.variableReadonly = CONTEXT_VARIABLE_IS_READONLY.bindTo(contextKeyService);
|
|
48
47
|
this.watchExpressionsExist.set(this.debugService.getModel().getWatchExpressions().length > 0);
|
|
49
48
|
this.watchItemType = CONTEXT_WATCH_ITEM_TYPE.bindTo(contextKeyService);
|
|
49
|
+
this.expressionRenderer = instantiationService.createInstance(DebugExpressionRenderer);
|
|
50
50
|
}
|
|
51
51
|
renderBody(container) {
|
|
52
52
|
super.renderBody(container);
|
|
53
53
|
this.element.classList.add('debug-pane');
|
|
54
54
|
container.classList.add('debug-watch');
|
|
55
55
|
const treeContainer = renderViewTree(container);
|
|
56
|
-
const
|
|
57
|
-
const expressionsRenderer = this.instantiationService.createInstance(WatchExpressionsRenderer, linkDetector);
|
|
56
|
+
const expressionsRenderer = this.instantiationService.createInstance(WatchExpressionsRenderer, this.expressionRenderer);
|
|
58
57
|
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'WatchExpressions', treeContainer, ( (new WatchExpressionsDelegate())), [
|
|
59
58
|
expressionsRenderer,
|
|
60
|
-
this.instantiationService.createInstance(VariablesRenderer,
|
|
61
|
-
this.instantiationService.createInstance(VisualizedVariableRenderer,
|
|
59
|
+
this.instantiationService.createInstance(VariablesRenderer, this.expressionRenderer),
|
|
60
|
+
this.instantiationService.createInstance(VisualizedVariableRenderer, this.expressionRenderer),
|
|
62
61
|
], this.instantiationService.createInstance(WatchExpressionsDataSource), {
|
|
63
62
|
accessibilityProvider: ( (new WatchExpressionsAccessibilityProvider())),
|
|
64
63
|
identityProvider: { getId: (element) => element.getId() },
|
|
@@ -226,9 +225,9 @@ class WatchExpressionsDataSource extends AbstractExpressionDataSource {
|
|
|
226
225
|
let WatchExpressionsRenderer = class WatchExpressionsRenderer extends AbstractExpressionsRenderer {
|
|
227
226
|
static { WatchExpressionsRenderer_1 = this; }
|
|
228
227
|
static { this.ID = 'watchexpression'; }
|
|
229
|
-
constructor(
|
|
228
|
+
constructor(expressionRenderer, menuService, contextKeyService, debugService, contextViewService, hoverService, configurationService) {
|
|
230
229
|
super(debugService, contextViewService, hoverService);
|
|
231
|
-
this.
|
|
230
|
+
this.expressionRenderer = expressionRenderer;
|
|
232
231
|
this.menuService = menuService;
|
|
233
232
|
this.contextKeyService = contextKeyService;
|
|
234
233
|
this.configurationService = configurationService;
|
|
@@ -271,18 +270,18 @@ let WatchExpressionsRenderer = class WatchExpressionsRenderer extends AbstractEx
|
|
|
271
270
|
title = expression.value;
|
|
272
271
|
}
|
|
273
272
|
data.label.set(text, highlights, title);
|
|
274
|
-
|
|
273
|
+
data.elementDisposable.add(this.expressionRenderer.renderValue(data.value, expression, {
|
|
275
274
|
showChanged: true,
|
|
276
275
|
maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_VIEWLET,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
276
|
+
colorize: true,
|
|
277
|
+
session: expression.getSession(),
|
|
278
|
+
}));
|
|
280
279
|
}
|
|
281
280
|
getInputBoxOptions(expression, settingValue) {
|
|
282
281
|
if (settingValue) {
|
|
283
282
|
return {
|
|
284
283
|
initialValue: expression.value,
|
|
285
|
-
ariaLabel: ( localize(
|
|
284
|
+
ariaLabel: ( localize(6095, "Type new value")),
|
|
286
285
|
onFinish: async (value, success) => {
|
|
287
286
|
if (success && value) {
|
|
288
287
|
const focusedFrame = this.debugService.getViewModel().focusedStackFrame;
|
|
@@ -296,8 +295,8 @@ let WatchExpressionsRenderer = class WatchExpressionsRenderer extends AbstractEx
|
|
|
296
295
|
}
|
|
297
296
|
return {
|
|
298
297
|
initialValue: expression.name ? expression.name : '',
|
|
299
|
-
ariaLabel: ( localize(
|
|
300
|
-
placeholder: ( localize(
|
|
298
|
+
ariaLabel: ( localize(6096, "Type watch expression")),
|
|
299
|
+
placeholder: ( localize(6097, "Expression to watch")),
|
|
301
300
|
onFinish: (value, success) => {
|
|
302
301
|
if (success && value) {
|
|
303
302
|
this.debugService.renameWatchExpression(expression.getId(), value);
|
|
@@ -338,13 +337,13 @@ function getContextForWatchExpressionMenu(parentContext, expression) {
|
|
|
338
337
|
}
|
|
339
338
|
class WatchExpressionsAccessibilityProvider {
|
|
340
339
|
getWidgetAriaLabel() {
|
|
341
|
-
return ( localize(
|
|
340
|
+
return ( localize(6098, "Debug Watch Expressions"));
|
|
342
341
|
}
|
|
343
342
|
getAriaLabel(element) {
|
|
344
343
|
if (element instanceof Expression) {
|
|
345
|
-
return ( localize(
|
|
344
|
+
return ( localize(6099, "{0}, value {1}", element.name, element.value));
|
|
346
345
|
}
|
|
347
|
-
return ( localize(
|
|
346
|
+
return ( localize(6100, "{0}, value {1}", element.name, element.value));
|
|
348
347
|
}
|
|
349
348
|
}
|
|
350
349
|
class WatchExpressionsDragAndDrop {
|
|
@@ -361,22 +360,22 @@ class WatchExpressionsDragAndDrop {
|
|
|
361
360
|
}
|
|
362
361
|
let dropEffectPosition = undefined;
|
|
363
362
|
if (targetIndex === undefined) {
|
|
364
|
-
dropEffectPosition =
|
|
363
|
+
dropEffectPosition = "drop-target-after" ;
|
|
365
364
|
targetIndex = -1;
|
|
366
365
|
}
|
|
367
366
|
else {
|
|
368
367
|
switch (targetSector) {
|
|
369
|
-
case
|
|
370
|
-
case
|
|
371
|
-
dropEffectPosition =
|
|
368
|
+
case 0 :
|
|
369
|
+
case 1 :
|
|
370
|
+
dropEffectPosition = "drop-target-before" ;
|
|
372
371
|
break;
|
|
373
|
-
case
|
|
374
|
-
case
|
|
375
|
-
dropEffectPosition =
|
|
372
|
+
case 2 :
|
|
373
|
+
case 3 :
|
|
374
|
+
dropEffectPosition = "drop-target-after" ;
|
|
376
375
|
break;
|
|
377
376
|
}
|
|
378
377
|
}
|
|
379
|
-
return { accept: true, effect: { type:
|
|
378
|
+
return { accept: true, effect: { type: 1 , position: dropEffectPosition }, feedback: [targetIndex] };
|
|
380
379
|
}
|
|
381
380
|
getDragURI(element) {
|
|
382
381
|
if (!(element instanceof Expression) || element === this.debugService.getViewModel().getSelectedExpression()?.expression) {
|
|
@@ -404,8 +403,8 @@ class WatchExpressionsDragAndDrop {
|
|
|
404
403
|
if (targetElement instanceof Expression) {
|
|
405
404
|
targetPosition = watches.indexOf(targetElement);
|
|
406
405
|
switch (targetSector) {
|
|
407
|
-
case
|
|
408
|
-
case
|
|
406
|
+
case 3 :
|
|
407
|
+
case 2 :
|
|
409
408
|
targetPosition++;
|
|
410
409
|
break;
|
|
411
410
|
}
|
|
@@ -425,7 +424,7 @@ registerAction2(class Collapse extends ViewAction {
|
|
|
425
424
|
super({
|
|
426
425
|
id: 'watch.collapse',
|
|
427
426
|
viewId: WATCH_VIEW_ID,
|
|
428
|
-
title: ( localize(
|
|
427
|
+
title: ( localize(6101, "Collapse All")),
|
|
429
428
|
f1: false,
|
|
430
429
|
icon: Codicon.collapseAll,
|
|
431
430
|
precondition: CONTEXT_WATCH_EXPRESSIONS_EXIST,
|
|
@@ -442,7 +441,7 @@ registerAction2(class Collapse extends ViewAction {
|
|
|
442
441
|
}
|
|
443
442
|
});
|
|
444
443
|
const ADD_WATCH_ID = 'workbench.debug.viewlet.action.addWatchExpression';
|
|
445
|
-
const ADD_WATCH_LABEL = ( localize(
|
|
444
|
+
const ADD_WATCH_LABEL = ( localize(6102, "Add Expression"));
|
|
446
445
|
registerAction2(class AddWatchExpressionAction extends Action2 {
|
|
447
446
|
constructor() {
|
|
448
447
|
super({
|
|
@@ -463,7 +462,7 @@ registerAction2(class AddWatchExpressionAction extends Action2 {
|
|
|
463
462
|
}
|
|
464
463
|
});
|
|
465
464
|
const REMOVE_WATCH_EXPRESSIONS_COMMAND_ID = 'workbench.debug.viewlet.action.removeAllWatchExpressions';
|
|
466
|
-
const REMOVE_WATCH_EXPRESSIONS_LABEL = ( localize(
|
|
465
|
+
const REMOVE_WATCH_EXPRESSIONS_LABEL = ( localize(6103, "Remove All Expressions"));
|
|
467
466
|
registerAction2(class RemoveAllWatchExpressionsAction extends Action2 {
|
|
468
467
|
constructor() {
|
|
469
468
|
super({
|
|
@@ -19,7 +19,6 @@ import { WorkbenchStateContext } from 'vscode/vscode/vs/workbench/common/context
|
|
|
19
19
|
import { OpenFileFolderAction, OpenFileAction, OpenFolderAction } from 'vscode/vscode/vs/workbench/browser/actions/workspaceActions';
|
|
20
20
|
import { isMacintosh, isWeb } from 'vscode/vscode/vs/base/common/platform';
|
|
21
21
|
import { isDiffEditor, isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
22
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
23
22
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
24
23
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
25
24
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -31,14 +30,14 @@ const CONTEXT_DEBUG_START_LANGUAGE = ( (new RawContextKey(debugStartLanguageKey,
|
|
|
31
30
|
const CONTEXT_DEBUGGER_INTERESTED_IN_ACTIVE_EDITOR = ( (new RawContextKey('debuggerInterestedInActiveEditor', false)));
|
|
32
31
|
let WelcomeView = class WelcomeView extends ViewPane {
|
|
33
32
|
static { this.ID = 'workbench.debug.welcome'; }
|
|
34
|
-
static { this.LABEL = ( localize2(
|
|
33
|
+
static { this.LABEL = ( localize2(6104, "Run")); }
|
|
35
34
|
constructor(options, themeService, keybindingService, contextMenuService, configurationService, contextKeyService, debugService, editorService, instantiationService, viewDescriptorService, openerService, storageSevice, telemetryService, hoverService) {
|
|
36
35
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
37
36
|
this.debugService = debugService;
|
|
38
37
|
this.editorService = editorService;
|
|
39
38
|
this.debugStartLanguageContext = CONTEXT_DEBUG_START_LANGUAGE.bindTo(contextKeyService);
|
|
40
39
|
this.debuggerInterestedContext = CONTEXT_DEBUGGER_INTERESTED_IN_ACTIVE_EDITOR.bindTo(contextKeyService);
|
|
41
|
-
const lastSetLanguage = storageSevice.get(debugStartLanguageKey,
|
|
40
|
+
const lastSetLanguage = storageSevice.get(debugStartLanguageKey, 1 );
|
|
42
41
|
this.debugStartLanguageContext.set(lastSetLanguage);
|
|
43
42
|
const setContextKey = () => {
|
|
44
43
|
let editorControl = this.editorService.activeTextEditorControl;
|
|
@@ -51,7 +50,7 @@ let WelcomeView = class WelcomeView extends ViewPane {
|
|
|
51
50
|
if (language && this.debugService.getAdapterManager().someDebuggerInterestedInLanguage(language)) {
|
|
52
51
|
this.debugStartLanguageContext.set(language);
|
|
53
52
|
this.debuggerInterestedContext.set(true);
|
|
54
|
-
storageSevice.store(debugStartLanguageKey, language,
|
|
53
|
+
storageSevice.store(debugStartLanguageKey, language, 1 , 1 );
|
|
55
54
|
return;
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -102,7 +101,7 @@ WelcomeView = ( (__decorate([
|
|
|
102
101
|
const viewsRegistry = ( (Registry.as(Extensions.ViewsRegistry)));
|
|
103
102
|
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
104
103
|
content: ( localize(
|
|
105
|
-
|
|
104
|
+
6105,
|
|
106
105
|
"[Open a file](command:{0}) which can be debugged or run.",
|
|
107
106
|
(isMacintosh && !isWeb) ? OpenFileFolderAction.ID : OpenFileAction.ID
|
|
108
107
|
)),
|
|
@@ -114,20 +113,20 @@ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
|
114
113
|
});
|
|
115
114
|
let debugKeybindingLabel = '';
|
|
116
115
|
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
117
|
-
content: `[${( localize(
|
|
116
|
+
content: `[${( localize(6106, "Run and Debug"))}${debugKeybindingLabel}](command:${DEBUG_START_COMMAND_ID})`,
|
|
118
117
|
when: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
119
118
|
group: ViewContentGroups.Debug,
|
|
120
119
|
order: 1
|
|
121
120
|
});
|
|
122
121
|
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
123
|
-
content: `[${( localize(
|
|
122
|
+
content: `[${( localize(6107, "Show all automatic debug configurations"))}](command:${SELECT_AND_START_ID}).`,
|
|
124
123
|
when: CONTEXT_DEBUGGERS_AVAILABLE,
|
|
125
124
|
group: ViewContentGroups.Debug,
|
|
126
125
|
order: 10
|
|
127
126
|
});
|
|
128
127
|
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
129
128
|
content: ( localize(
|
|
130
|
-
|
|
129
|
+
6108,
|
|
131
130
|
"To customize Run and Debug [create a launch.json file](command:{0}).",
|
|
132
131
|
DEBUG_CONFIGURE_COMMAND_ID
|
|
133
132
|
)),
|
|
@@ -139,7 +138,7 @@ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
|
139
138
|
});
|
|
140
139
|
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
141
140
|
content: ( localize(
|
|
142
|
-
|
|
141
|
+
6109,
|
|
143
142
|
"To customize Run and Debug, [open a folder](command:{0}) and create a launch.json file.",
|
|
144
143
|
(isMacintosh && !isWeb) ? OpenFileFolderAction.ID : OpenFolderAction.ID
|
|
145
144
|
)),
|
|
@@ -151,7 +150,7 @@ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
|
151
150
|
});
|
|
152
151
|
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
153
152
|
content: ( localize(
|
|
154
|
-
|
|
153
|
+
6110,
|
|
155
154
|
"All debug extensions are disabled. Enable a debug extension or install a new one from the Marketplace."
|
|
156
155
|
)),
|
|
157
156
|
when: ( (CONTEXT_DEBUG_EXTENSION_AVAILABLE.toNegated())),
|
|
@@ -49,14 +49,14 @@ let DebugContentProvider = class DebugContentProvider {
|
|
|
49
49
|
session = this.debugService.getViewModel().focusedSession;
|
|
50
50
|
}
|
|
51
51
|
if (!session) {
|
|
52
|
-
return Promise.reject(( (new ErrorNoTelemetry(( localize(
|
|
52
|
+
return Promise.reject(( (new ErrorNoTelemetry(( localize(6111, "Unable to resolve the resource without a debug session"))))));
|
|
53
53
|
}
|
|
54
54
|
const createErrModel = (errMsg) => {
|
|
55
55
|
this.debugService.sourceIsNotAvailable(resource);
|
|
56
56
|
const languageSelection = this.languageService.createById(PLAINTEXT_LANGUAGE_ID);
|
|
57
57
|
const message = errMsg
|
|
58
|
-
? ( localize(
|
|
59
|
-
: ( localize(
|
|
58
|
+
? ( localize(6112, "Could not load source '{0}': {1}.", resource.path, errMsg))
|
|
59
|
+
: ( localize(6113, "Could not load source '{0}'.", resource.path));
|
|
60
60
|
return this.modelService.createModel(message, languageSelection, resource);
|
|
61
61
|
};
|
|
62
62
|
return session.loadSource(resource).then(response => {
|
|
@@ -30,20 +30,20 @@ let DebugLifecycle = class DebugLifecycle {
|
|
|
30
30
|
let message;
|
|
31
31
|
if (numSessions === 1) {
|
|
32
32
|
message = ( localize(
|
|
33
|
-
|
|
33
|
+
6114,
|
|
34
34
|
"There is an active debug session, are you sure you want to stop it?"
|
|
35
35
|
));
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
38
|
message = ( localize(
|
|
39
|
-
|
|
39
|
+
6115,
|
|
40
40
|
"There are active debug sessions, are you sure you want to stop them?"
|
|
41
41
|
));
|
|
42
42
|
}
|
|
43
43
|
const res = await this.dialogService.confirm({
|
|
44
44
|
message,
|
|
45
45
|
type: 'warning',
|
|
46
|
-
primaryButton: ( localize(
|
|
46
|
+
primaryButton: ( localize(6116, "&&Stop Debugging"))
|
|
47
47
|
});
|
|
48
48
|
return !res.confirmed;
|
|
49
49
|
}
|