@codingame/monaco-vscode-debug-service-override 1.82.6 → 1.83.0-next.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 +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +4 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +2 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +16 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +16 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +40 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +25 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +7 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +7 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +13 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +226 -118
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +26 -9
- 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/common/debugModel.js +29 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +8 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +10 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
-
import { registerColor } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
3
|
+
import { registerColor, asCssVariableName, asCssVariable } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
4
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
5
5
|
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
6
|
-
import { STATUS_BAR_FOREGROUND, STATUS_BAR_BORDER } from 'vscode/vscode/vs/workbench/common/theme';
|
|
6
|
+
import { STATUS_BAR_FOREGROUND, STATUS_BAR_BORDER, COMMAND_CENTER_BACKGROUND } from 'vscode/vscode/vs/workbench/common/theme';
|
|
7
7
|
import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
8
8
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
9
9
|
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
10
|
+
import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
|
|
10
11
|
|
|
11
12
|
const STATUS_BAR_DEBUGGING_BACKGROUND = registerColor('statusBar.debuggingBackground', {
|
|
12
13
|
dark: '#CC6633',
|
|
@@ -35,6 +36,15 @@ const STATUS_BAR_DEBUGGING_BORDER = registerColor('statusBar.debuggingBorder', {
|
|
|
35
36
|
'statusBarDebuggingBorder',
|
|
36
37
|
"Status bar border color separating to the sidebar and editor when a program is being debugged. The status bar is shown in the bottom of the window"
|
|
37
38
|
)));
|
|
39
|
+
const COMMAND_CENTER_DEBUGGING_BACKGROUND = registerColor('commandCenter.debuggingBackground', {
|
|
40
|
+
dark: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 },
|
|
41
|
+
hcDark: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 },
|
|
42
|
+
light: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 },
|
|
43
|
+
hcLight: { value: STATUS_BAR_DEBUGGING_BACKGROUND, op: 2 , factor: 0.258 }
|
|
44
|
+
}, ( localize(
|
|
45
|
+
'commandCenter-activeBackground',
|
|
46
|
+
"Command center background color when a program is being debugged"
|
|
47
|
+
)), true);
|
|
38
48
|
let StatusBarColorProvider = class StatusBarColorProvider {
|
|
39
49
|
set enabled(enabled) {
|
|
40
50
|
if (enabled === !!this.disposable) {
|
|
@@ -53,29 +63,35 @@ let StatusBarColorProvider = class StatusBarColorProvider {
|
|
|
53
63
|
this.disposable = undefined;
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
|
-
constructor(debugService, contextService, statusbarService, configurationService) {
|
|
66
|
+
constructor(debugService, contextService, statusbarService, layoutService, configurationService) {
|
|
57
67
|
this.debugService = debugService;
|
|
58
68
|
this.contextService = contextService;
|
|
59
69
|
this.statusbarService = statusbarService;
|
|
70
|
+
this.layoutService = layoutService;
|
|
60
71
|
this.configurationService = configurationService;
|
|
61
72
|
this.disposables = ( new DisposableStore());
|
|
62
73
|
this.debugService.onDidChangeState(this.update, this, this.disposables);
|
|
63
74
|
this.contextService.onDidChangeWorkbenchState(this.update, this, this.disposables);
|
|
64
75
|
this.configurationService.onDidChangeConfiguration((e) => {
|
|
65
|
-
if (e.affectsConfiguration('debug.enableStatusBarColor')) {
|
|
76
|
+
if (e.affectsConfiguration('debug.enableStatusBarColor') || e.affectsConfiguration('debug.toolBarLocation')) {
|
|
66
77
|
this.update();
|
|
67
78
|
}
|
|
68
79
|
});
|
|
69
80
|
this.update();
|
|
70
81
|
}
|
|
71
82
|
update() {
|
|
72
|
-
const
|
|
73
|
-
|
|
83
|
+
const debugConfig = this.configurationService.getValue('debug');
|
|
84
|
+
const isInDebugMode = isStatusbarInDebugMode(this.debugService.state, this.debugService.getModel().getSessions());
|
|
85
|
+
if (!debugConfig.enableStatusBarColor) {
|
|
74
86
|
this.enabled = false;
|
|
75
87
|
}
|
|
76
88
|
else {
|
|
77
|
-
this.enabled =
|
|
89
|
+
this.enabled = isInDebugMode;
|
|
78
90
|
}
|
|
91
|
+
const isInCommandCenter = debugConfig.toolBarLocation === 'commandCenter';
|
|
92
|
+
this.layoutService.container.style.setProperty(asCssVariableName(COMMAND_CENTER_BACKGROUND), isInCommandCenter && isInDebugMode
|
|
93
|
+
? asCssVariable(COMMAND_CENTER_DEBUGGING_BACKGROUND)
|
|
94
|
+
: '');
|
|
79
95
|
}
|
|
80
96
|
dispose() {
|
|
81
97
|
this.disposable?.dispose();
|
|
@@ -86,7 +102,8 @@ StatusBarColorProvider = ( __decorate([
|
|
|
86
102
|
( __param(0, IDebugService)),
|
|
87
103
|
( __param(1, IWorkspaceContextService)),
|
|
88
104
|
( __param(2, IStatusbarService)),
|
|
89
|
-
( __param(3,
|
|
105
|
+
( __param(3, ILayoutService)),
|
|
106
|
+
( __param(4, IConfigurationService))
|
|
90
107
|
], StatusBarColorProvider));
|
|
91
108
|
function isStatusbarInDebugMode(state, sessions) {
|
|
92
109
|
if (state === 0 || state === 1 || sessions.every(s => s.suppressDebugStatusbar || s.configuration?.noDebug)) {
|
|
@@ -95,4 +112,4 @@ function isStatusbarInDebugMode(state, sessions) {
|
|
|
95
112
|
return true;
|
|
96
113
|
}
|
|
97
114
|
|
|
98
|
-
export { STATUS_BAR_DEBUGGING_BACKGROUND, STATUS_BAR_DEBUGGING_BORDER, STATUS_BAR_DEBUGGING_FOREGROUND, StatusBarColorProvider, isStatusbarInDebugMode };
|
|
115
|
+
export { COMMAND_CENTER_DEBUGGING_BACKGROUND, STATUS_BAR_DEBUGGING_BACKGROUND, STATUS_BAR_DEBUGGING_BORDER, STATUS_BAR_DEBUGGING_FOREGROUND, StatusBarColorProvider, isStatusbarInDebugMode };
|
|
@@ -97,6 +97,7 @@ let VariablesView = class VariablesView extends ViewPane {
|
|
|
97
97
|
forgetScopes = true;
|
|
98
98
|
this.tree.updateChildren();
|
|
99
99
|
}));
|
|
100
|
+
this._register(this.tree);
|
|
100
101
|
this._register(this.tree.onMouseDblClick(e => this.onMouseDblClick(e)));
|
|
101
102
|
this._register(this.tree.onContextMenu(async (e) => await this.onContextMenu(e)));
|
|
102
103
|
this._register(this.onDidChangeBodyVisibility(visible => {
|
|
@@ -345,6 +345,7 @@ class WatchExpressionsDragAndDrop {
|
|
|
345
345
|
const position = targetElement instanceof Expression ? watches.indexOf(targetElement) : watches.length - 1;
|
|
346
346
|
this.debugService.moveWatchExpression(draggedElement.getId(), position);
|
|
347
347
|
}
|
|
348
|
+
dispose() { }
|
|
348
349
|
}
|
|
349
350
|
registerAction2(class Collapse extends ViewAction {
|
|
350
351
|
constructor() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { distinct
|
|
2
|
+
import { distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
3
3
|
import { DeferredPromise, RunOnceScheduler } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
4
4
|
import { decodeBase64, VSBuffer, encodeBase64 } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
5
5
|
import { CancellationTokenSource } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
@@ -20,6 +20,7 @@ import { DisassemblyViewInput } from './disassemblyViewInput.js';
|
|
|
20
20
|
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles';
|
|
21
21
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
22
22
|
import { autorun } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
23
|
+
import { findLastIdx } from 'monaco-editor/esm/vs/base/common/arraysFind.js';
|
|
23
24
|
|
|
24
25
|
class ExpressionContainer {
|
|
25
26
|
static { this.allValues = ( (new Map())); }
|
|
@@ -421,8 +422,9 @@ class StackFrame {
|
|
|
421
422
|
const threadStopReason = this.thread.stoppedDetails?.reason;
|
|
422
423
|
if (this.instructionPointerReference &&
|
|
423
424
|
(threadStopReason === 'instruction breakpoint' ||
|
|
424
|
-
(threadStopReason === 'step' && this.thread.lastSteppingGranularity === 'instruction')
|
|
425
|
-
|
|
425
|
+
(threadStopReason === 'step' && this.thread.lastSteppingGranularity === 'instruction') ||
|
|
426
|
+
editorService.activeEditor instanceof DisassemblyViewInput)) {
|
|
427
|
+
return editorService.openEditor(DisassemblyViewInput.instance, { pinned: true, revealIfOpened: true });
|
|
426
428
|
}
|
|
427
429
|
if (this.source.available) {
|
|
428
430
|
return this.source.openInEditor(editorService, this.range, preserveFocus, sideBySide, pinned);
|
|
@@ -936,11 +938,12 @@ class ExceptionBreakpoint extends BaseBreakpoint {
|
|
|
936
938
|
}
|
|
937
939
|
}
|
|
938
940
|
class InstructionBreakpoint extends BaseBreakpoint {
|
|
939
|
-
constructor(instructionReference, offset, canPersist, enabled, hitCondition, condition, logMessage, id = generateUuid()) {
|
|
941
|
+
constructor(instructionReference, offset, canPersist, enabled, hitCondition, condition, logMessage, address, id = generateUuid()) {
|
|
940
942
|
super(enabled, hitCondition, condition, logMessage, id);
|
|
941
943
|
this.instructionReference = instructionReference;
|
|
942
944
|
this.offset = offset;
|
|
943
945
|
this.canPersist = canPersist;
|
|
946
|
+
this.address = address;
|
|
944
947
|
}
|
|
945
948
|
toJSON() {
|
|
946
949
|
const result = super.toJSON();
|
|
@@ -1020,7 +1023,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1020
1023
|
}
|
|
1021
1024
|
let index = -1;
|
|
1022
1025
|
if (session.parentSession) {
|
|
1023
|
-
index =
|
|
1026
|
+
index = findLastIdx(this.sessions, s => s.parentSession === session.parentSession || s === session.parentSession);
|
|
1024
1027
|
}
|
|
1025
1028
|
if (index >= 0) {
|
|
1026
1029
|
this.sessions.splice(index + 1, 0, session);
|
|
@@ -1418,16 +1421,30 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1418
1421
|
}
|
|
1419
1422
|
this._onDidChangeBreakpoints.fire({ removed, sessionOnly: false });
|
|
1420
1423
|
}
|
|
1421
|
-
addInstructionBreakpoint(
|
|
1422
|
-
const newInstructionBreakpoint = ( (new InstructionBreakpoint(
|
|
1424
|
+
addInstructionBreakpoint(instructionReference, offset, address, condition, hitCondition) {
|
|
1425
|
+
const newInstructionBreakpoint = ( (new InstructionBreakpoint(
|
|
1426
|
+
instructionReference,
|
|
1427
|
+
offset,
|
|
1428
|
+
false,
|
|
1429
|
+
true,
|
|
1430
|
+
hitCondition,
|
|
1431
|
+
condition,
|
|
1432
|
+
undefined,
|
|
1433
|
+
address
|
|
1434
|
+
)));
|
|
1423
1435
|
this.instructionBreakpoints.push(newInstructionBreakpoint);
|
|
1424
1436
|
this._onDidChangeBreakpoints.fire({ added: [newInstructionBreakpoint], sessionOnly: true });
|
|
1425
1437
|
}
|
|
1426
|
-
removeInstructionBreakpoints(
|
|
1427
|
-
let removed;
|
|
1428
|
-
if (
|
|
1429
|
-
|
|
1430
|
-
|
|
1438
|
+
removeInstructionBreakpoints(instructionReference, offset) {
|
|
1439
|
+
let removed = [];
|
|
1440
|
+
if (instructionReference) {
|
|
1441
|
+
for (let i = 0; i < this.instructionBreakpoints.length; i++) {
|
|
1442
|
+
const ibp = this.instructionBreakpoints[i];
|
|
1443
|
+
if (ibp.instructionReference === instructionReference && (offset === undefined || ibp.offset === offset)) {
|
|
1444
|
+
removed.push(ibp);
|
|
1445
|
+
this.instructionBreakpoints.splice(i--, 1);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1431
1448
|
}
|
|
1432
1449
|
else {
|
|
1433
1450
|
removed = this.instructionBreakpoints;
|
|
@@ -100,6 +100,14 @@ const debuggersExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
100
100
|
type: 'string',
|
|
101
101
|
default: ''
|
|
102
102
|
},
|
|
103
|
+
hiddenWhen: {
|
|
104
|
+
description: ( nls.localize(
|
|
105
|
+
'vscode.extension.contributes.debuggers.hiddenWhen',
|
|
106
|
+
"When this condition is true, this debugger type is hidden from the debugger list, but is still enabled."
|
|
107
|
+
)),
|
|
108
|
+
type: 'string',
|
|
109
|
+
default: ''
|
|
110
|
+
},
|
|
103
111
|
deprecated: {
|
|
104
112
|
description: ( nls.localize(
|
|
105
113
|
'vscode.extension.contributes.debuggers.deprecated',
|
|
@@ -22,11 +22,11 @@ let DebugStorage = class DebugStorage extends Disposable {
|
|
|
22
22
|
this.textFileService = textFileService;
|
|
23
23
|
this.uriIdentityService = uriIdentityService;
|
|
24
24
|
this.logService = logService;
|
|
25
|
-
this.breakpoints = observableValue(
|
|
26
|
-
this.functionBreakpoints = observableValue(
|
|
27
|
-
this.exceptionBreakpoints = observableValue(
|
|
28
|
-
this.dataBreakpoints = observableValue(
|
|
29
|
-
this.watchExpressions = observableValue(
|
|
25
|
+
this.breakpoints = observableValue(this, this.loadBreakpoints());
|
|
26
|
+
this.functionBreakpoints = observableValue(this, this.loadFunctionBreakpoints());
|
|
27
|
+
this.exceptionBreakpoints = observableValue(this, this.loadExceptionBreakpoints());
|
|
28
|
+
this.dataBreakpoints = observableValue(this, this.loadDataBreakpoints());
|
|
29
|
+
this.watchExpressions = observableValue(this, this.loadWatchExpressions());
|
|
30
30
|
this._register(storageService.onDidChangeValue(1 , undefined, this._store)(e => {
|
|
31
31
|
if (e.external) {
|
|
32
32
|
switch (e.key) {
|
|
@@ -27,6 +27,7 @@ let Debugger = class Debugger {
|
|
|
27
27
|
this.debuggerContribution = { type: dbgContribution.type };
|
|
28
28
|
this.merge(dbgContribution, extensionDescription);
|
|
29
29
|
this.debuggerWhen = typeof this.debuggerContribution.when === 'string' ? ContextKeyExpr.deserialize(this.debuggerContribution.when) : undefined;
|
|
30
|
+
this.debuggerHiddenWhen = typeof this.debuggerContribution.hiddenWhen === 'string' ? ContextKeyExpr.deserialize(this.debuggerContribution.hiddenWhen) : undefined;
|
|
30
31
|
}
|
|
31
32
|
merge(otherDebuggerContribution, extensionDescription) {
|
|
32
33
|
function mixin(destination, source, overwrite, level = 0) {
|
|
@@ -102,9 +103,18 @@ let Debugger = class Debugger {
|
|
|
102
103
|
get when() {
|
|
103
104
|
return this.debuggerWhen;
|
|
104
105
|
}
|
|
106
|
+
get hiddenWhen() {
|
|
107
|
+
return this.debuggerHiddenWhen;
|
|
108
|
+
}
|
|
105
109
|
get enabled() {
|
|
106
110
|
return !this.debuggerWhen || this.contextKeyService.contextMatchesRules(this.debuggerWhen);
|
|
107
111
|
}
|
|
112
|
+
get isHiddenFromDropdown() {
|
|
113
|
+
if (!this.debuggerHiddenWhen) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
return this.contextKeyService.contextMatchesRules(this.debuggerHiddenWhen);
|
|
117
|
+
}
|
|
108
118
|
get strings() {
|
|
109
119
|
return this.debuggerContribution.strings ?? this.debuggerContribution.uiMessages;
|
|
110
120
|
}
|