@codingame/monaco-vscode-debug-service-override 11.1.2 → 12.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/index.d.ts +2 -1
- package/index.js +27 -1
- package/package.json +42 -8
- package/service-override/tools/debugAssets.d.ts +1 -0
- package/service-override/tools/debugAssets.js +5 -0
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.d.ts +28 -0
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.d.ts +79 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +24 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +108 -132
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +208 -264
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +46 -40
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.d.ts +71 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +72 -54
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.d.ts +91 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +151 -148
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +10 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +65 -107
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +108 -105
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.d.ts +65 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +49 -37
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +11 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +4 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +24 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.d.ts +160 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +194 -169
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.d.ts +206 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +150 -173
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +14 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +76 -68
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +4 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +70 -94
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.d.ts +45 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +59 -84
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.d.ts +64 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +61 -60
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +19 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +7 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.d.ts +36 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +55 -53
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +1 -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/media/exceptionWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +62 -61
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.d.ts +107 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +148 -155
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +39 -38
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +8 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +6 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.d.ts +131 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +42 -40
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +74 -76
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +16 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.d.ts +78 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +74 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +63 -63
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +53 -66
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +3 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +16 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugContext.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContext.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +11 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +51 -50
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +26 -22
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +2 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +3 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.d.ts +52 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +83 -84
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +5 -4
- package/debug.js +0 -26
- package/tools/debugAssets.js +0 -4
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { $ as $$1, append, addStandardDisposableListener, SafeTriangle, isAncestorOfActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
4
|
import { DomScrollableElement } from 'vscode/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
|
|
4
5
|
import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
|
|
5
6
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
7
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
6
8
|
import { DisposableStore, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
9
|
import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
8
10
|
import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
11
|
+
import { ScrollbarVisibility } from 'vscode/vscode/vs/base/common/scrollable';
|
|
12
|
+
import { ContentWidgetPositionPreference } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
13
|
+
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
9
14
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
10
15
|
import { ModelDecorationOptions } from 'vscode/vscode/vs/editor/common/model/textModel';
|
|
11
16
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
@@ -29,14 +34,20 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
|
29
34
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
30
35
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
31
36
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
32
|
-
import { Variable, Expression, VisualizedExpression } from '@codingame/monaco-vscode-
|
|
37
|
+
import { Variable, Expression, VisualizedExpression } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
33
38
|
import { getEvaluatableExpressionAtPosition } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
34
39
|
import { AbstractExpressionDataSource } from './baseDebugView.js';
|
|
35
|
-
import { DebugExpressionRenderer } from '@codingame/monaco-vscode-
|
|
40
|
+
import { DebugExpressionRenderer } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/browser/debugExpressionRenderer';
|
|
36
41
|
import { VariablesRenderer, VisualizedVariableRenderer, openContextMenuForVariableTreeElement } from './variablesView.js';
|
|
37
42
|
|
|
38
43
|
var DebugHoverWidget_1;
|
|
39
44
|
const $ = $$1;
|
|
45
|
+
var ShowDebugHoverResult;
|
|
46
|
+
(function (ShowDebugHoverResult) {
|
|
47
|
+
ShowDebugHoverResult[ShowDebugHoverResult["NOT_CHANGED"] = 0] = "NOT_CHANGED";
|
|
48
|
+
ShowDebugHoverResult[ShowDebugHoverResult["NOT_AVAILABLE"] = 1] = "NOT_AVAILABLE";
|
|
49
|
+
ShowDebugHoverResult[ShowDebugHoverResult["CANCELLED"] = 2] = "CANCELLED";
|
|
50
|
+
})(ShowDebugHoverResult || (ShowDebugHoverResult = {}));
|
|
40
51
|
async function doFindExpression(container, namesToFind) {
|
|
41
52
|
if (!container) {
|
|
42
53
|
return null;
|
|
@@ -56,7 +67,7 @@ async function doFindExpression(container, namesToFind) {
|
|
|
56
67
|
async function findExpressionInStackFrame(stackFrame, namesToFind) {
|
|
57
68
|
const scopes = await stackFrame.getScopes();
|
|
58
69
|
const nonExpensive = scopes.filter(s => !s.expensive);
|
|
59
|
-
const expressions = coalesce(await Promise.all((
|
|
70
|
+
const expressions = coalesce(await Promise.all(( nonExpensive.map(scope => doFindExpression(scope, namesToFind)))));
|
|
60
71
|
return expressions.length > 0 && expressions.every(e => e.value === expressions[0].value) ? expressions[0] : undefined;
|
|
61
72
|
}
|
|
62
73
|
let DebugHoverWidget = class DebugHoverWidget {
|
|
@@ -77,7 +88,7 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
77
88
|
this.isUpdatingTree = false;
|
|
78
89
|
this.toDispose = [];
|
|
79
90
|
this.showAtPosition = null;
|
|
80
|
-
this.positionPreference = [
|
|
91
|
+
this.positionPreference = [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW];
|
|
81
92
|
this.debugHoverComputer = this.instantiationService.createInstance(DebugHoverComputer, this.editor);
|
|
82
93
|
this.expressionRenderer = this.instantiationService.createInstance(DebugExpressionRenderer);
|
|
83
94
|
}
|
|
@@ -89,16 +100,16 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
89
100
|
this.treeContainer.setAttribute('role', 'tree');
|
|
90
101
|
const tip = append(this.complexValueContainer, $('.tip'));
|
|
91
102
|
tip.textContent = ( localize(
|
|
92
|
-
|
|
103
|
+
5273,
|
|
93
104
|
'Hold {0} key to switch to editor language hover',
|
|
94
105
|
isMacintosh ? 'Option' : 'Alt'
|
|
95
106
|
));
|
|
96
107
|
const dataSource = this.instantiationService.createInstance(DebugHoverDataSource);
|
|
97
|
-
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, (
|
|
108
|
+
this.tree = this.instantiationService.createInstance((WorkbenchAsyncDataTree), 'DebugHover', this.treeContainer, ( new DebugHoverDelegate()), [
|
|
98
109
|
this.instantiationService.createInstance(VariablesRenderer, this.expressionRenderer),
|
|
99
110
|
this.instantiationService.createInstance(VisualizedVariableRenderer, this.expressionRenderer),
|
|
100
111
|
], dataSource, {
|
|
101
|
-
accessibilityProvider: (
|
|
112
|
+
accessibilityProvider: ( new DebugHoverAccessibilityProvider()),
|
|
102
113
|
mouseSupport: false,
|
|
103
114
|
horizontalScrolling: true,
|
|
104
115
|
useShadows: false,
|
|
@@ -111,7 +122,7 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
111
122
|
this.valueContainer = $('.value');
|
|
112
123
|
this.valueContainer.tabIndex = 0;
|
|
113
124
|
this.valueContainer.setAttribute('role', 'tooltip');
|
|
114
|
-
this.scrollbar = (
|
|
125
|
+
this.scrollbar = ( new DomScrollableElement(this.valueContainer, { horizontal: ScrollbarVisibility.Hidden }));
|
|
115
126
|
this.domNode.appendChild(this.scrollbar.getDomNode());
|
|
116
127
|
this.toDispose.push(this.scrollbar);
|
|
117
128
|
this.editor.applyFontInfo(this.domNode);
|
|
@@ -141,12 +152,12 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
141
152
|
}
|
|
142
153
|
registerListeners() {
|
|
143
154
|
this.toDispose.push(addStandardDisposableListener(this.domNode, 'keydown', (e) => {
|
|
144
|
-
if (e.equals(
|
|
155
|
+
if (e.equals(KeyCode.Escape)) {
|
|
145
156
|
this.hide();
|
|
146
157
|
}
|
|
147
158
|
}));
|
|
148
159
|
this.toDispose.push(this.editor.onDidChangeConfiguration((e) => {
|
|
149
|
-
if (e.hasChanged(
|
|
160
|
+
if (e.hasChanged(EditorOption.fontInfo)) {
|
|
150
161
|
this.editor.applyFontInfo(this.domNode);
|
|
151
162
|
}
|
|
152
163
|
}));
|
|
@@ -177,32 +188,32 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
177
188
|
}
|
|
178
189
|
async showAt(position, focus, mouseEvent) {
|
|
179
190
|
this.showCancellationSource?.dispose(true);
|
|
180
|
-
const cancellationSource = this.showCancellationSource = (
|
|
191
|
+
const cancellationSource = this.showCancellationSource = ( new CancellationTokenSource());
|
|
181
192
|
const session = this.debugService.getViewModel().focusedSession;
|
|
182
193
|
if (!session || !this.editor.hasModel()) {
|
|
183
194
|
this.hide();
|
|
184
|
-
return
|
|
195
|
+
return ShowDebugHoverResult.NOT_AVAILABLE;
|
|
185
196
|
}
|
|
186
197
|
const result = await this.debugHoverComputer.compute(position, cancellationSource.token);
|
|
187
198
|
if (cancellationSource.token.isCancellationRequested) {
|
|
188
199
|
this.hide();
|
|
189
|
-
return
|
|
200
|
+
return ShowDebugHoverResult.CANCELLED;
|
|
190
201
|
}
|
|
191
202
|
if (!result.range) {
|
|
192
203
|
this.hide();
|
|
193
|
-
return
|
|
204
|
+
return ShowDebugHoverResult.NOT_AVAILABLE;
|
|
194
205
|
}
|
|
195
206
|
if (this.isVisible() && !result.rangeChanged) {
|
|
196
|
-
return
|
|
207
|
+
return ShowDebugHoverResult.NOT_CHANGED;
|
|
197
208
|
}
|
|
198
209
|
const expression = await this.debugHoverComputer.evaluate(session);
|
|
199
210
|
if (cancellationSource.token.isCancellationRequested) {
|
|
200
211
|
this.hide();
|
|
201
|
-
return
|
|
212
|
+
return ShowDebugHoverResult.CANCELLED;
|
|
202
213
|
}
|
|
203
214
|
if (!expression || (expression instanceof Expression && !expression.available)) {
|
|
204
215
|
this.hide();
|
|
205
|
-
return
|
|
216
|
+
return ShowDebugHoverResult.NOT_AVAILABLE;
|
|
206
217
|
}
|
|
207
218
|
this.highlightDecorations.set([{
|
|
208
219
|
range: result.range,
|
|
@@ -232,6 +243,7 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
232
243
|
}));
|
|
233
244
|
this.valueContainer.title = '';
|
|
234
245
|
this.editor.layoutContentWidget(this);
|
|
246
|
+
this.safeTriangle = mouseEvent && new SafeTriangle(mouseEvent.posx, mouseEvent.posy, this.domNode);
|
|
235
247
|
this.scrollbar.scanDomNode();
|
|
236
248
|
if (focus) {
|
|
237
249
|
this.editor.render();
|
|
@@ -243,10 +255,10 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
243
255
|
this.expressionToRender = expression;
|
|
244
256
|
store.add(this.expressionRenderer.renderValue(this.complexValueTitle, expression, { hover: false, session }));
|
|
245
257
|
this.editor.layoutContentWidget(this);
|
|
258
|
+
this.safeTriangle = mouseEvent && new SafeTriangle(mouseEvent.posx, mouseEvent.posy, this.domNode);
|
|
246
259
|
this.tree.scrollTop = 0;
|
|
247
260
|
this.tree.scrollLeft = 0;
|
|
248
261
|
this.complexValueContainer.hidden = false;
|
|
249
|
-
this.safeTriangle = mouseEvent && new SafeTriangle(mouseEvent.posx, mouseEvent.posy, this.domNode);
|
|
250
262
|
if (focus) {
|
|
251
263
|
this.editor.render();
|
|
252
264
|
this.tree.domFocus();
|
|
@@ -305,7 +317,7 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
305
317
|
this._isVisible = undefined;
|
|
306
318
|
this.highlightDecorations.clear();
|
|
307
319
|
this.editor.layoutContentWidget(this);
|
|
308
|
-
this.positionPreference = [
|
|
320
|
+
this.positionPreference = [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW];
|
|
309
321
|
}
|
|
310
322
|
getPosition() {
|
|
311
323
|
return this._isVisible ? {
|
|
@@ -317,19 +329,19 @@ let DebugHoverWidget = class DebugHoverWidget {
|
|
|
317
329
|
this.toDispose = dispose(this.toDispose);
|
|
318
330
|
}
|
|
319
331
|
};
|
|
320
|
-
DebugHoverWidget = DebugHoverWidget_1 = (
|
|
321
|
-
(
|
|
322
|
-
(
|
|
323
|
-
(
|
|
324
|
-
(
|
|
325
|
-
(
|
|
326
|
-
], DebugHoverWidget))
|
|
332
|
+
DebugHoverWidget = DebugHoverWidget_1 = ( __decorate([
|
|
333
|
+
( __param(1, IDebugService)),
|
|
334
|
+
( __param(2, IInstantiationService)),
|
|
335
|
+
( __param(3, IMenuService)),
|
|
336
|
+
( __param(4, IContextKeyService)),
|
|
337
|
+
( __param(5, IContextMenuService))
|
|
338
|
+
], DebugHoverWidget));
|
|
327
339
|
class DebugHoverAccessibilityProvider {
|
|
328
340
|
getWidgetAriaLabel() {
|
|
329
|
-
return
|
|
341
|
+
return localize(5274, "Debug Hover");
|
|
330
342
|
}
|
|
331
343
|
getAriaLabel(element) {
|
|
332
|
-
return
|
|
344
|
+
return localize(5275, "{0}, value {1}, variables, debug", element.name, element.value);
|
|
333
345
|
}
|
|
334
346
|
}
|
|
335
347
|
class DebugHoverDataSource extends AbstractExpressionDataSource {
|
|
@@ -381,7 +393,7 @@ let DebugHoverComputer = class DebugHoverComputer {
|
|
|
381
393
|
const textModel = this.editor.getModel();
|
|
382
394
|
const debugSource = textModel && session.getSourceForUri(textModel?.uri);
|
|
383
395
|
if (session.capabilities.supportsEvaluateForHovers) {
|
|
384
|
-
const expression = (
|
|
396
|
+
const expression = ( new Expression(this._current.expression));
|
|
385
397
|
await expression.evaluate(session, this.debugService.getViewModel().focusedStackFrame, 'hover', undefined, debugSource ? {
|
|
386
398
|
line: this._current.range.startLineNumber,
|
|
387
399
|
column: this._current.range.startColumn,
|
|
@@ -392,16 +404,16 @@ let DebugHoverComputer = class DebugHoverComputer {
|
|
|
392
404
|
else {
|
|
393
405
|
const focusedStackFrame = this.debugService.getViewModel().focusedStackFrame;
|
|
394
406
|
if (focusedStackFrame) {
|
|
395
|
-
return await findExpressionInStackFrame(focusedStackFrame, coalesce((
|
|
407
|
+
return await findExpressionInStackFrame(focusedStackFrame, coalesce(( this._current.expression.split('.').map(word => word.trim()))));
|
|
396
408
|
}
|
|
397
409
|
}
|
|
398
410
|
return undefined;
|
|
399
411
|
}
|
|
400
412
|
};
|
|
401
|
-
DebugHoverComputer = (
|
|
402
|
-
(
|
|
403
|
-
(
|
|
404
|
-
(
|
|
405
|
-
], DebugHoverComputer))
|
|
413
|
+
DebugHoverComputer = ( __decorate([
|
|
414
|
+
( __param(1, IDebugService)),
|
|
415
|
+
( __param(2, ILanguageFeaturesService)),
|
|
416
|
+
( __param(3, ILogService))
|
|
417
|
+
], DebugHoverComputer));
|
|
406
418
|
|
|
407
|
-
export { DebugHoverWidget, findExpressionInStackFrame };
|
|
419
|
+
export { DebugHoverWidget, ShowDebugHoverResult, findExpressionInStackFrame };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
3
|
+
import { IFileOpenOptions, IFileChange, IFileSystemProvider, IStat, IWatchOptions } from "vscode/vscode/vs/platform/files/common/files";
|
|
4
|
+
import { IDebugSession } from "vscode/vscode/vs/workbench/contrib/debug/common/debug";
|
|
5
|
+
import { IDebugService } from "vscode/vscode/vs/workbench/contrib/debug/common/debug.service";
|
|
6
|
+
export declare class DebugMemoryFileSystemProvider implements IFileSystemProvider {
|
|
7
|
+
private readonly debugService;
|
|
8
|
+
private memoryFdCounter;
|
|
9
|
+
private readonly fdMemory;
|
|
10
|
+
private readonly changeEmitter;
|
|
11
|
+
readonly onDidChangeCapabilities: Event<any>;
|
|
12
|
+
readonly onDidChangeFile: Event<readonly IFileChange[]>;
|
|
13
|
+
readonly capabilities: number;
|
|
14
|
+
constructor(debugService: IDebugService);
|
|
15
|
+
watch(resource: URI, opts: IWatchOptions): import("vscode/vscode/vs/base/common/lifecycle").IDisposable;
|
|
16
|
+
stat(file: URI): Promise<IStat>;
|
|
17
|
+
mkdir(): never;
|
|
18
|
+
readdir(): never;
|
|
19
|
+
delete(): never;
|
|
20
|
+
rename(): never;
|
|
21
|
+
open(resource: URI, _opts: IFileOpenOptions): Promise<number>;
|
|
22
|
+
close(fd: number): Promise<void>;
|
|
23
|
+
writeFile(resource: URI, content: Uint8Array): Promise<void>;
|
|
24
|
+
readFile(resource: URI): Promise<Uint8Array>;
|
|
25
|
+
read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
26
|
+
write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
27
|
+
protected parseUri(uri: URI): {
|
|
28
|
+
session: IDebugSession;
|
|
29
|
+
offset: {
|
|
30
|
+
fromOffset: number;
|
|
31
|
+
toOffset: number;
|
|
32
|
+
} | undefined;
|
|
33
|
+
readOnly: boolean;
|
|
34
|
+
sessionId: string;
|
|
35
|
+
memoryReference: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
|
|
1
2
|
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
2
3
|
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
4
|
import { toDisposable, DisposableStore, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
5
6
|
import { assertNever } from 'vscode/vscode/vs/base/common/assert';
|
|
6
|
-
import { FileType, FilePermission, createFileSystemProviderError, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
7
|
-
import { DEBUG_MEMORY_SCHEME } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
7
|
+
import { FileSystemProviderCapabilities, FileChangeType, FileType, FilePermission, createFileSystemProviderError, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
8
|
+
import { State, MemoryRangeType, DEBUG_MEMORY_SCHEME } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
8
9
|
|
|
9
10
|
const rangeRe = /range=([0-9]+):([0-9]+)/;
|
|
10
11
|
class DebugMemoryFileSystemProvider {
|
|
@@ -16,8 +17,8 @@ class DebugMemoryFileSystemProvider {
|
|
|
16
17
|
this.onDidChangeCapabilities = Event.None;
|
|
17
18
|
this.onDidChangeFile = this.changeEmitter.event;
|
|
18
19
|
this.capabilities = 0
|
|
19
|
-
|
|
|
20
|
-
|
|
|
20
|
+
| FileSystemProviderCapabilities.PathCaseSensitive
|
|
21
|
+
| FileSystemProviderCapabilities.FileOpenReadWriteClose;
|
|
21
22
|
debugService.onDidEndSession(({ session }) => {
|
|
22
23
|
for (const [fd, memory] of this.fdMemory) {
|
|
23
24
|
if (memory.session === session) {
|
|
@@ -33,8 +34,8 @@ class DebugMemoryFileSystemProvider {
|
|
|
33
34
|
const { session, memoryReference, offset } = this.parseUri(resource);
|
|
34
35
|
const disposable = ( new DisposableStore());
|
|
35
36
|
disposable.add(session.onDidChangeState(() => {
|
|
36
|
-
if (session.state ===
|
|
37
|
-
this.changeEmitter.fire([{ type:
|
|
37
|
+
if (session.state === State.Running || session.state === State.Inactive) {
|
|
38
|
+
this.changeEmitter.fire([{ type: FileChangeType.DELETED, resource }]);
|
|
38
39
|
}
|
|
39
40
|
}));
|
|
40
41
|
disposable.add(session.onDidInvalidateMemory(e => {
|
|
@@ -44,7 +45,7 @@ class DebugMemoryFileSystemProvider {
|
|
|
44
45
|
if (offset && (e.body.offset >= offset.toOffset || e.body.offset + e.body.count < offset.fromOffset)) {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
47
|
-
this.changeEmitter.fire([{ resource, type:
|
|
48
|
+
this.changeEmitter.fire([{ resource, type: FileChangeType.UPDATED }]);
|
|
48
49
|
}));
|
|
49
50
|
return disposable;
|
|
50
51
|
}
|
|
@@ -122,16 +123,16 @@ class DebugMemoryFileSystemProvider {
|
|
|
122
123
|
let readSoFar = 0;
|
|
123
124
|
for (const range of ranges) {
|
|
124
125
|
switch (range.type) {
|
|
125
|
-
case
|
|
126
|
+
case MemoryRangeType.Unreadable:
|
|
126
127
|
return readSoFar;
|
|
127
|
-
case
|
|
128
|
+
case MemoryRangeType.Error:
|
|
128
129
|
if (readSoFar > 0) {
|
|
129
130
|
return readSoFar;
|
|
130
131
|
}
|
|
131
132
|
else {
|
|
132
133
|
throw createFileSystemProviderError(range.error, FileSystemProviderErrorCode.Unknown);
|
|
133
134
|
}
|
|
134
|
-
case
|
|
135
|
+
case MemoryRangeType.Valid: {
|
|
135
136
|
const start = Math.max(0, pos - range.offset);
|
|
136
137
|
const toWrite = range.data.slice(start, Math.min(range.data.byteLength, start + (length - readSoFar)));
|
|
137
138
|
data.set(toWrite.buffer, offset + readSoFar);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IProgressService } from "vscode/vscode/vs/platform/progress/common/progress.service";
|
|
2
|
+
import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
|
|
3
|
+
import { IDebugService } from "vscode/vscode/vs/workbench/contrib/debug/common/debug.service";
|
|
4
|
+
import { IViewsService } from "vscode/vscode/vs/workbench/services/views/common/viewsService.service";
|
|
5
|
+
export declare class DebugProgressContribution implements IWorkbenchContribution {
|
|
6
|
+
private toDispose;
|
|
7
|
+
constructor(debugService: IDebugService, progressService: IProgressService, viewsService: IViewsService);
|
|
8
|
+
dispose(): void;
|
|
9
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
4
|
import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
4
6
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
5
7
|
import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
6
8
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
@@ -28,7 +30,7 @@ let DebugProgressContribution = class DebugProgressContribution {
|
|
|
28
30
|
}
|
|
29
31
|
const source = debugService.getAdapterManager().getDebuggerLabel(session.configuration.type);
|
|
30
32
|
progressService.withProgress({
|
|
31
|
-
location:
|
|
33
|
+
location: ProgressLocation.Notification,
|
|
32
34
|
title: progressStartEvent.body.title,
|
|
33
35
|
cancellable: progressStartEvent.body.cancellable,
|
|
34
36
|
source,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IQuickPickSeparator } from "vscode/vscode/vs/platform/quickinput/common/quickInput";
|
|
2
|
+
import { PickerQuickAccessProvider, IPickerQuickAccessItem } from "@codingame/monaco-vscode-219d9a5f-b446-507b-a188-1178a0867c75-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess";
|
|
3
|
+
import { INotificationService } from "vscode/vscode/vs/platform/notification/common/notification.service";
|
|
4
|
+
import { IDebugService } from "vscode/vscode/vs/workbench/contrib/debug/common/debug.service";
|
|
5
|
+
import { IWorkspaceContextService } from "vscode/vscode/vs/platform/workspace/common/workspace.service";
|
|
6
|
+
import { ICommandService } from "vscode/vscode/vs/platform/commands/common/commands.service";
|
|
7
|
+
export declare class StartDebugQuickAccessProvider extends PickerQuickAccessProvider<IPickerQuickAccessItem> {
|
|
8
|
+
private readonly debugService;
|
|
9
|
+
private readonly contextService;
|
|
10
|
+
private readonly commandService;
|
|
11
|
+
private readonly notificationService;
|
|
12
|
+
constructor(debugService: IDebugService, contextService: IWorkspaceContextService, commandService: ICommandService, notificationService: INotificationService);
|
|
13
|
+
protected _getPicks(filter: string): Promise<(IQuickPickSeparator | IPickerQuickAccessItem)[]>;
|
|
14
|
+
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
3
|
+
import { PickerQuickAccessProvider, TriggerAction } from '@codingame/monaco-vscode-219d9a5f-b446-507b-a188-1178a0867c75-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
|
|
3
4
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
4
5
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
5
6
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
7
|
+
import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
6
8
|
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
7
9
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
8
10
|
import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
|
|
9
|
-
import { DEBUG_QUICK_ACCESS_PREFIX, ADD_CONFIGURATION_ID } from '@codingame/monaco-vscode-
|
|
10
|
-
import { debugConfigure, debugRemoveConfig } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
11
|
+
import { DEBUG_QUICK_ACCESS_PREFIX, ADD_CONFIGURATION_ID } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/browser/debugCommands';
|
|
12
|
+
import { debugConfigure, debugRemoveConfig } from '@codingame/monaco-vscode-fc42f049-7883-579d-bb0b-2aa1010a19a8-common/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
11
13
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
12
14
|
|
|
13
15
|
let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends PickerQuickAccessProvider {
|
|
14
16
|
constructor(debugService, contextService, commandService, notificationService) {
|
|
15
17
|
super(DEBUG_QUICK_ACCESS_PREFIX, {
|
|
16
18
|
noResultsPick: {
|
|
17
|
-
label: ( localize(
|
|
19
|
+
label: ( localize(5333, "No matching launch configurations"))
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
22
|
this.debugService = debugService;
|
|
@@ -39,11 +41,11 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
39
41
|
}
|
|
40
42
|
picks.push({
|
|
41
43
|
label: config.name,
|
|
42
|
-
description: this.contextService.getWorkbenchState() ===
|
|
44
|
+
description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? config.launch.name : '',
|
|
43
45
|
highlights: { label: highlights },
|
|
44
46
|
buttons: [{
|
|
45
47
|
iconClass: ThemeIcon.asClassName(debugConfigure),
|
|
46
|
-
tooltip: ( localize(
|
|
48
|
+
tooltip: ( localize(5334, "Configure Launch Configuration"))
|
|
47
49
|
}],
|
|
48
50
|
trigger: () => {
|
|
49
51
|
config.launch.openConfigFile({ preserveFocus: false });
|
|
@@ -64,7 +66,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
64
66
|
const dynamicProviders = await configManager.getDynamicProviders();
|
|
65
67
|
if (dynamicProviders.length > 0) {
|
|
66
68
|
picks.push({
|
|
67
|
-
type: 'separator', label: ( localize(
|
|
69
|
+
type: 'separator', label: ( localize(5335, "contributed"))
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
72
|
configManager.getRecentDynamicConfigurations().forEach(({ name, type }) => {
|
|
@@ -75,7 +77,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
75
77
|
highlights: { label: highlights },
|
|
76
78
|
buttons: [{
|
|
77
79
|
iconClass: ThemeIcon.asClassName(debugRemoveConfig),
|
|
78
|
-
tooltip: ( localize(
|
|
80
|
+
tooltip: ( localize(5336, "Remove Launch Configuration"))
|
|
79
81
|
}],
|
|
80
82
|
trigger: () => {
|
|
81
83
|
configManager.removeRecentDynamicConfigurations(name, type);
|
|
@@ -98,7 +100,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
98
100
|
dynamicProviders.forEach(provider => {
|
|
99
101
|
picks.push({
|
|
100
102
|
label: `$(folder) ${provider.label}...`,
|
|
101
|
-
ariaLabel: ( localize(
|
|
103
|
+
ariaLabel: ( localize(5337, "{0} contributed configurations", provider.label)),
|
|
102
104
|
accept: async () => {
|
|
103
105
|
const pick = await provider.pick();
|
|
104
106
|
if (pick) {
|
|
@@ -110,27 +112,27 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
110
112
|
});
|
|
111
113
|
const visibleLaunches = configManager.getLaunches().filter(launch => !launch.hidden);
|
|
112
114
|
if (visibleLaunches.length > 0) {
|
|
113
|
-
picks.push({ type: 'separator', label: ( localize(
|
|
115
|
+
picks.push({ type: 'separator', label: ( localize(5338, "configure")) });
|
|
114
116
|
}
|
|
115
117
|
for (const launch of visibleLaunches) {
|
|
116
|
-
const label = this.contextService.getWorkbenchState() ===
|
|
117
|
-
( localize(
|
|
118
|
-
( localize(
|
|
118
|
+
const label = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ?
|
|
119
|
+
( localize(5339, "Add Config ({0})...", launch.name)) :
|
|
120
|
+
( localize(5340, "Add Configuration..."));
|
|
119
121
|
picks.push({
|
|
120
122
|
label,
|
|
121
|
-
description: this.contextService.getWorkbenchState() ===
|
|
123
|
+
description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? launch.name : '',
|
|
122
124
|
highlights: { label: matchesFuzzy(filter, label, true) ?? undefined },
|
|
123
|
-
accept: () => this.commandService.executeCommand(ADD_CONFIGURATION_ID, (
|
|
125
|
+
accept: () => this.commandService.executeCommand(ADD_CONFIGURATION_ID, ( launch.uri.toString()))
|
|
124
126
|
});
|
|
125
127
|
}
|
|
126
128
|
return picks;
|
|
127
129
|
}
|
|
128
130
|
};
|
|
129
|
-
StartDebugQuickAccessProvider = (
|
|
130
|
-
(
|
|
131
|
-
(
|
|
132
|
-
(
|
|
133
|
-
(
|
|
134
|
-
], StartDebugQuickAccessProvider))
|
|
131
|
+
StartDebugQuickAccessProvider = ( __decorate([
|
|
132
|
+
( __param(0, IDebugService)),
|
|
133
|
+
( __param(1, IWorkspaceContextService)),
|
|
134
|
+
( __param(2, ICommandService)),
|
|
135
|
+
( __param(3, INotificationService))
|
|
136
|
+
], StartDebugQuickAccessProvider));
|
|
135
137
|
|
|
136
138
|
export { StartDebugQuickAccessProvider };
|