@codingame/monaco-vscode-debug-service-override 11.1.1 → 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,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { addDisposableListener, isKeyboardEvent } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
4
|
import { DomEmitter } from 'vscode/vscode/vs/base/browser/event';
|
|
4
5
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
@@ -8,24 +9,31 @@ import { memoize } from 'vscode/vscode/vs/base/common/decorators';
|
|
|
8
9
|
import { onUnexpectedExternalError, illegalArgument } from 'vscode/vscode/vs/base/common/errors';
|
|
9
10
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
10
11
|
import { visit } from 'vscode/vscode/vs/base/common/json';
|
|
11
|
-
import { setProperty } from 'vscode/vscode/vs/base/common/jsonEdit';
|
|
12
|
+
import { setProperty } from '@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common/vscode/vs/base/common/jsonEdit';
|
|
13
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
12
14
|
import { MutableDisposable, DisposableStore, toDisposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
13
15
|
import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
14
16
|
import { basename } from 'vscode/vscode/vs/base/common/path';
|
|
15
17
|
import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
16
18
|
import { noBreakWhitespace, format } from 'vscode/vscode/vs/base/common/strings';
|
|
17
19
|
import { isDefined, assertType } from 'vscode/vscode/vs/base/common/types';
|
|
20
|
+
import { Constants } from 'vscode/vscode/vs/base/common/uint';
|
|
18
21
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
19
22
|
import { CoreEditingCommands } from 'vscode/vscode/vs/editor/browser/coreCommands';
|
|
23
|
+
import { MouseTargetType } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
24
|
+
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
20
25
|
import { EditOperation } from 'vscode/vscode/vs/editor/common/core/editOperation';
|
|
21
26
|
import { Position } from 'vscode/vscode/vs/editor/common/core/position';
|
|
22
27
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
23
28
|
import { DEFAULT_WORD_REGEXP } from 'vscode/vscode/vs/editor/common/core/wordHelper';
|
|
29
|
+
import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
|
|
30
|
+
import { StandardTokenType } from 'vscode/vscode/vs/editor/common/encodedTokenAttributes';
|
|
24
31
|
import { InjectedTextCursorStops } from 'vscode/vscode/vs/editor/common/model';
|
|
25
32
|
import { ILanguageFeatureDebounceService } from 'vscode/vscode/vs/editor/common/services/languageFeatureDebounce';
|
|
26
33
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
27
34
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
28
35
|
import { ContentHoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/contentHoverController';
|
|
36
|
+
import { HoverStartMode, HoverStartSource } from 'vscode/vscode/vs/editor/contrib/hover/browser/hoverOperation';
|
|
29
37
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
30
38
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
31
39
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
@@ -44,11 +52,11 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
|
44
52
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
45
53
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
46
54
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
47
|
-
import { DebugHoverWidget } from './debugHover.js';
|
|
55
|
+
import { DebugHoverWidget, ShowDebugHoverResult } from './debugHover.js';
|
|
48
56
|
import { ExceptionWidget } from './exceptionWidget.js';
|
|
49
|
-
import { CONTEXT_EXCEPTION_WIDGET_VISIBLE } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
57
|
+
import { CONTEXT_EXCEPTION_WIDGET_VISIBLE, State } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
50
58
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
51
|
-
import { Expression } from '@codingame/monaco-vscode-
|
|
59
|
+
import { Expression } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
52
60
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
53
61
|
|
|
54
62
|
const MAX_NUM_INLINE_VALUES = 100;
|
|
@@ -60,15 +68,15 @@ registerColor('editor.inlineValuesForeground', {
|
|
|
60
68
|
light: '#00000080',
|
|
61
69
|
hcDark: '#ffffff80',
|
|
62
70
|
hcLight: '#00000080'
|
|
63
|
-
}, ( localize(
|
|
64
|
-
registerColor('editor.inlineValuesBackground', '#ffc80033', ( localize(
|
|
71
|
+
}, ( localize(5271, "Color for the debug inline value text.")));
|
|
72
|
+
registerColor('editor.inlineValuesBackground', '#ffc80033', ( localize(5272, "Color for the debug inline value background.")));
|
|
65
73
|
class InlineSegment {
|
|
66
74
|
constructor(column, text) {
|
|
67
75
|
this.column = column;
|
|
68
76
|
this.text = text;
|
|
69
77
|
}
|
|
70
78
|
}
|
|
71
|
-
function createInlineValueDecoration(lineNumber, contentText, column =
|
|
79
|
+
function createInlineValueDecoration(lineNumber, contentText, column = Constants.MAX_SAFE_SMALL_INTEGER) {
|
|
72
80
|
if (contentText.length > MAX_INLINE_DECORATOR_LENGTH) {
|
|
73
81
|
contentText = contentText.substring(0, MAX_INLINE_DECORATOR_LENGTH) + '...';
|
|
74
82
|
}
|
|
@@ -113,20 +121,20 @@ function replaceWsWithNoBreakWs(str) {
|
|
|
113
121
|
return str.replace(/[ \t]/g, noBreakWhitespace);
|
|
114
122
|
}
|
|
115
123
|
function createInlineValueDecorationsInsideRange(expressions, ranges, model, wordToLineNumbersMap) {
|
|
116
|
-
const nameValueMap = (
|
|
124
|
+
const nameValueMap = ( new Map());
|
|
117
125
|
for (const expr of expressions) {
|
|
118
126
|
nameValueMap.set(expr.name, expr.value);
|
|
119
127
|
if (nameValueMap.size >= MAX_NUM_INLINE_VALUES) {
|
|
120
128
|
break;
|
|
121
129
|
}
|
|
122
130
|
}
|
|
123
|
-
const lineToNamesMap = (
|
|
131
|
+
const lineToNamesMap = ( new Map());
|
|
124
132
|
nameValueMap.forEach((_value, name) => {
|
|
125
133
|
const lineNumbers = wordToLineNumbersMap.get(name);
|
|
126
134
|
if (lineNumbers) {
|
|
127
135
|
for (const lineNumber of lineNumbers) {
|
|
128
|
-
if ((
|
|
129
|
-
if (!(
|
|
136
|
+
if (( ranges.some(r => lineNumber >= r.startLineNumber && lineNumber <= r.endLineNumber))) {
|
|
137
|
+
if (!( lineToNamesMap.has(lineNumber))) {
|
|
130
138
|
lineToNamesMap.set(lineNumber, []);
|
|
131
139
|
}
|
|
132
140
|
if (lineToNamesMap.get(lineNumber).indexOf(name) === -1) {
|
|
@@ -136,15 +144,13 @@ function createInlineValueDecorationsInsideRange(expressions, ranges, model, wor
|
|
|
136
144
|
}
|
|
137
145
|
}
|
|
138
146
|
});
|
|
139
|
-
return (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
})))
|
|
147
|
-
);
|
|
147
|
+
return ( [...lineToNamesMap].map(([line, names]) => ({
|
|
148
|
+
line,
|
|
149
|
+
variables: ( names.sort((first, second) => {
|
|
150
|
+
const content = model.getLineContent(line);
|
|
151
|
+
return content.indexOf(first) - content.indexOf(second);
|
|
152
|
+
}).map(name => ({ name, value: nameValueMap.get(name) })))
|
|
153
|
+
})));
|
|
148
154
|
}
|
|
149
155
|
function getWordToLineNumbersMap(model, lineNumber, result) {
|
|
150
156
|
const lineLength = model.getLineLength(lineNumber);
|
|
@@ -156,7 +162,7 @@ function getWordToLineNumbersMap(model, lineNumber, result) {
|
|
|
156
162
|
const lineTokens = model.tokenization.getLineTokens(lineNumber);
|
|
157
163
|
for (let tokenIndex = 0, tokenCount = lineTokens.getCount(); tokenIndex < tokenCount; tokenIndex++) {
|
|
158
164
|
const tokenType = lineTokens.getStandardTokenType(tokenIndex);
|
|
159
|
-
if (tokenType ===
|
|
165
|
+
if (tokenType === StandardTokenType.Other) {
|
|
160
166
|
DEFAULT_WORD_REGEXP.lastIndex = 0;
|
|
161
167
|
const tokenStartOffset = lineTokens.getStartOffset(tokenIndex);
|
|
162
168
|
const tokenEndOffset = lineTokens.getEndOffset(tokenIndex);
|
|
@@ -164,7 +170,7 @@ function getWordToLineNumbersMap(model, lineNumber, result) {
|
|
|
164
170
|
const wordMatch = DEFAULT_WORD_REGEXP.exec(tokenStr);
|
|
165
171
|
if (wordMatch) {
|
|
166
172
|
const word = wordMatch[0];
|
|
167
|
-
if (!(
|
|
173
|
+
if (!( result.has(word))) {
|
|
168
174
|
result.set(word, []);
|
|
169
175
|
}
|
|
170
176
|
result.get(word).push(lineNumber);
|
|
@@ -184,11 +190,11 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
184
190
|
this.languageFeaturesService = languageFeaturesService;
|
|
185
191
|
this.mouseDown = false;
|
|
186
192
|
this.gutterIsHovered = false;
|
|
187
|
-
this.altListener = (
|
|
193
|
+
this.altListener = ( new MutableDisposable());
|
|
188
194
|
this.altPressed = false;
|
|
189
195
|
this.oldDecorations = this.editor.createDecorationsCollection();
|
|
190
|
-
this.displayedStore = (
|
|
191
|
-
this.defaultHoverLockout = (
|
|
196
|
+
this.displayedStore = ( new DisposableStore());
|
|
197
|
+
this.defaultHoverLockout = ( new MutableDisposable());
|
|
192
198
|
this.debounceInfo = featureDebounceService.for(languageFeaturesService.inlineValuesProvider, 'InlineValues', { min: DEAFULT_INLINE_DEBOUNCE_DELAY });
|
|
193
199
|
this.hoverWidget = this.instantiationService.createInstance(DebugHoverWidget, this.editor);
|
|
194
200
|
this.toDispose = [this.defaultHoverLockout, this.altListener, this.displayedStore];
|
|
@@ -229,7 +235,7 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
229
235
|
this.toDispose.push(this.editor.onDidScrollChange(() => {
|
|
230
236
|
this.hideHoverWidget();
|
|
231
237
|
const model = this.editor.getModel();
|
|
232
|
-
if (model && (
|
|
238
|
+
if (model && ( this.languageFeaturesService.inlineValuesProvider.has(model))) {
|
|
233
239
|
this.updateInlineValuesScheduler.schedule();
|
|
234
240
|
}
|
|
235
241
|
}));
|
|
@@ -239,7 +245,7 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
239
245
|
}
|
|
240
246
|
}));
|
|
241
247
|
this.toDispose.push(this.debugService.onDidChangeState((state) => {
|
|
242
|
-
if (state !==
|
|
248
|
+
if (state !== State.Stopped) {
|
|
243
249
|
this.toggleExceptionWidget();
|
|
244
250
|
}
|
|
245
251
|
}));
|
|
@@ -268,8 +274,8 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
268
274
|
}
|
|
269
275
|
const ownerDocument = this.editor.getContainerDomNode().ownerDocument;
|
|
270
276
|
this.altListener.value = addDisposableListener(ownerDocument, 'keydown', keydownEvent => {
|
|
271
|
-
const standardKeyboardEvent = (
|
|
272
|
-
if (standardKeyboardEvent.keyCode ===
|
|
277
|
+
const standardKeyboardEvent = ( new StandardKeyboardEvent(keydownEvent));
|
|
278
|
+
if (standardKeyboardEvent.keyCode === KeyCode.Alt) {
|
|
273
279
|
this.altPressed = true;
|
|
274
280
|
const debugHoverWasVisible = this.hoverWidget.isVisible();
|
|
275
281
|
this.hoverWidget.hide();
|
|
@@ -277,13 +283,13 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
277
283
|
if (debugHoverWasVisible && this.hoverPosition) {
|
|
278
284
|
this.showEditorHover(this.hoverPosition.position, false);
|
|
279
285
|
}
|
|
280
|
-
const onKeyUp = (
|
|
286
|
+
const onKeyUp = ( new DomEmitter(ownerDocument, 'keyup'));
|
|
281
287
|
const listener = Event.any(this.hostService.onDidChangeFocus, onKeyUp.event)(keyupEvent => {
|
|
282
288
|
let standardKeyboardEvent = undefined;
|
|
283
289
|
if (isKeyboardEvent(keyupEvent)) {
|
|
284
|
-
standardKeyboardEvent = (
|
|
290
|
+
standardKeyboardEvent = ( new StandardKeyboardEvent(keyupEvent));
|
|
285
291
|
}
|
|
286
|
-
if (!standardKeyboardEvent || standardKeyboardEvent.keyCode ===
|
|
292
|
+
if (!standardKeyboardEvent || standardKeyboardEvent.keyCode === KeyCode.Alt) {
|
|
287
293
|
this.altPressed = false;
|
|
288
294
|
this.preventDefaultEditorHover();
|
|
289
295
|
listener.dispose();
|
|
@@ -299,7 +305,7 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
299
305
|
const model = this.editor.getModel();
|
|
300
306
|
if (sf && model && this.uriIdentityService.extUri.isEqual(sf.source.uri, model.uri)) {
|
|
301
307
|
const result = await this.hoverWidget.showAt(position, focus, mouseEvent);
|
|
302
|
-
if (result ===
|
|
308
|
+
if (result === ShowDebugHoverResult.NOT_AVAILABLE) {
|
|
303
309
|
this.showEditorHover(position, focus);
|
|
304
310
|
}
|
|
305
311
|
}
|
|
@@ -324,9 +330,9 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
324
330
|
}
|
|
325
331
|
showEditorHover(position, focus) {
|
|
326
332
|
const hoverController = this.editor.getContribution(ContentHoverController.ID);
|
|
327
|
-
const range = (
|
|
333
|
+
const range = ( new Range(position.lineNumber, position.column, position.lineNumber, position.column));
|
|
328
334
|
this.defaultHoverLockout.clear();
|
|
329
|
-
hoverController?.showContentHover(range,
|
|
335
|
+
hoverController?.showContentHover(range, HoverStartMode.Immediate, HoverStartSource.Mouse, focus);
|
|
330
336
|
}
|
|
331
337
|
async onFocusStackFrame(sf) {
|
|
332
338
|
const model = this.editor.getModel();
|
|
@@ -347,11 +353,11 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
347
353
|
return baseDelay * delayFactor;
|
|
348
354
|
}
|
|
349
355
|
get showHoverScheduler() {
|
|
350
|
-
const scheduler = (
|
|
356
|
+
const scheduler = ( new RunOnceScheduler(() => {
|
|
351
357
|
if (this.hoverPosition && !this.altPressed) {
|
|
352
358
|
this.showHover(this.hoverPosition.position, false, this.hoverPosition.event);
|
|
353
359
|
}
|
|
354
|
-
}, this.hoverDelay))
|
|
360
|
+
}, this.hoverDelay));
|
|
355
361
|
this.toDispose.push(scheduler);
|
|
356
362
|
return scheduler;
|
|
357
363
|
}
|
|
@@ -364,19 +370,19 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
364
370
|
}
|
|
365
371
|
onEditorMouseDown(mouseEvent) {
|
|
366
372
|
this.mouseDown = true;
|
|
367
|
-
if (mouseEvent.target.type ===
|
|
373
|
+
if (mouseEvent.target.type === MouseTargetType.CONTENT_WIDGET && mouseEvent.target.detail === DebugHoverWidget.ID) {
|
|
368
374
|
return;
|
|
369
375
|
}
|
|
370
376
|
this.hideHoverWidget();
|
|
371
377
|
}
|
|
372
378
|
onEditorMouseMove(mouseEvent) {
|
|
373
|
-
if (this.debugService.state !==
|
|
379
|
+
if (this.debugService.state !== State.Stopped) {
|
|
374
380
|
return;
|
|
375
381
|
}
|
|
376
382
|
const target = mouseEvent.target;
|
|
377
383
|
const stopKey = isMacintosh ? 'metaKey' : 'ctrlKey';
|
|
378
384
|
if (!this.altPressed) {
|
|
379
|
-
if (target.type ===
|
|
385
|
+
if (target.type === MouseTargetType.GUTTER_GLYPH_MARGIN) {
|
|
380
386
|
this.defaultHoverLockout.clear();
|
|
381
387
|
this.gutterIsHovered = true;
|
|
382
388
|
}
|
|
@@ -385,13 +391,14 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
385
391
|
this.updateHoverConfiguration();
|
|
386
392
|
}
|
|
387
393
|
}
|
|
388
|
-
if (target.type ===
|
|
394
|
+
if ((target.type === MouseTargetType.CONTENT_WIDGET && target.detail === DebugHoverWidget.ID)
|
|
395
|
+
|| this.hoverWidget.isInSafeTriangle(mouseEvent.event.posx, mouseEvent.event.posy)) {
|
|
389
396
|
const sticky = this.editorHoverOptions?.sticky ?? true;
|
|
390
|
-
if (sticky || this.hoverWidget.isShowingComplexValue) {
|
|
397
|
+
if (sticky || this.hoverWidget.isShowingComplexValue || mouseEvent.event[stopKey]) {
|
|
391
398
|
return;
|
|
392
399
|
}
|
|
393
400
|
}
|
|
394
|
-
if (target.type ===
|
|
401
|
+
if (target.type === MouseTargetType.CONTENT_TEXT) {
|
|
395
402
|
if (target.position && !Position.equals(target.position, this.hoverPosition?.position || null) && !this.hoverWidget.isInSafeTriangle(mouseEvent.event.posx, mouseEvent.event.posy)) {
|
|
396
403
|
this.hoverPosition = { position: target.position, event: mouseEvent.event };
|
|
397
404
|
this.preventDefaultEditorHover();
|
|
@@ -403,8 +410,8 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
403
410
|
}
|
|
404
411
|
}
|
|
405
412
|
onKeyDown(e) {
|
|
406
|
-
const stopKey = isMacintosh ?
|
|
407
|
-
if (e.keyCode !== stopKey && e.keyCode !==
|
|
413
|
+
const stopKey = isMacintosh ? KeyCode.Meta : KeyCode.Ctrl;
|
|
414
|
+
if (e.keyCode !== stopKey && e.keyCode !== KeyCode.Alt) {
|
|
408
415
|
this.hideHoverWidget();
|
|
409
416
|
}
|
|
410
417
|
}
|
|
@@ -491,12 +498,12 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
491
498
|
setProperty(model.getValue(), ['launch'], { 'configurations': [] }, { tabSize, insertSpaces, eol })[0];
|
|
492
499
|
const startPosition = model.getPositionAt(edit.offset);
|
|
493
500
|
const lineNumber = startPosition.lineNumber;
|
|
494
|
-
const range = (
|
|
501
|
+
const range = ( new Range(
|
|
495
502
|
lineNumber,
|
|
496
503
|
startPosition.column,
|
|
497
504
|
lineNumber,
|
|
498
505
|
model.getLineMaxColumn(lineNumber)
|
|
499
|
-
))
|
|
506
|
+
));
|
|
500
507
|
model.pushEditOperations(null, [EditOperation.replace(range, edit.content)], () => null);
|
|
501
508
|
getConfigurationPosition();
|
|
502
509
|
}
|
|
@@ -516,29 +523,25 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
516
523
|
await this.commandService.executeCommand('editor.action.triggerSuggest');
|
|
517
524
|
}
|
|
518
525
|
get removeInlineValuesScheduler() {
|
|
519
|
-
return (
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}, 100))
|
|
524
|
-
);
|
|
526
|
+
return ( new RunOnceScheduler(() => {
|
|
527
|
+
this.displayedStore.clear();
|
|
528
|
+
this.oldDecorations.clear();
|
|
529
|
+
}, 100));
|
|
525
530
|
}
|
|
526
531
|
get updateInlineValuesScheduler() {
|
|
527
532
|
const model = this.editor.getModel();
|
|
528
|
-
return (
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
))
|
|
533
|
-
);
|
|
533
|
+
return ( new RunOnceScheduler(
|
|
534
|
+
async () => await this.updateInlineValueDecorations(this.debugService.getViewModel().focusedStackFrame),
|
|
535
|
+
model ? this.debounceInfo.get(model) : DEAFULT_INLINE_DEBOUNCE_DELAY
|
|
536
|
+
));
|
|
534
537
|
}
|
|
535
538
|
async updateInlineValueDecorations(stackFrame) {
|
|
536
539
|
const var_value_format = '{0} = {1}';
|
|
537
540
|
const separator = ', ';
|
|
538
541
|
const model = this.editor.getModel();
|
|
539
542
|
const inlineValuesSetting = this.configurationService.getValue('debug').inlineValues;
|
|
540
|
-
const inlineValuesTurnedOn = inlineValuesSetting === true || inlineValuesSetting === 'on' || (inlineValuesSetting === 'auto' && model && (
|
|
541
|
-
if (!inlineValuesTurnedOn || !model || !stackFrame || (
|
|
543
|
+
const inlineValuesTurnedOn = inlineValuesSetting === true || inlineValuesSetting === 'on' || (inlineValuesSetting === 'auto' && model && ( this.languageFeaturesService.inlineValuesProvider.has(model)));
|
|
544
|
+
if (!inlineValuesTurnedOn || !model || !stackFrame || ( model.uri.toString()) !== ( stackFrame.source.uri.toString())) {
|
|
542
545
|
if (!this.removeInlineValuesScheduler.isScheduled()) {
|
|
543
546
|
this.removeInlineValuesScheduler.schedule();
|
|
544
547
|
}
|
|
@@ -548,9 +551,9 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
548
551
|
this.displayedStore.clear();
|
|
549
552
|
const viewRanges = this.editor.getVisibleRangesPlusViewportAboveBelow();
|
|
550
553
|
let allDecorations;
|
|
551
|
-
const cts = (
|
|
554
|
+
const cts = ( new CancellationTokenSource());
|
|
552
555
|
this.displayedStore.add(toDisposable(() => cts.dispose(true)));
|
|
553
|
-
if ((
|
|
556
|
+
if (( this.languageFeaturesService.inlineValuesProvider.has(model))) {
|
|
554
557
|
const findVariable = async (_key, caseSensitiveLookup) => {
|
|
555
558
|
const scopes = await stackFrame.getMostSpecificScopes(stackFrame.range);
|
|
556
559
|
const key = caseSensitiveLookup ? _key : _key.toLowerCase();
|
|
@@ -565,17 +568,17 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
565
568
|
};
|
|
566
569
|
const ctx = {
|
|
567
570
|
frameId: stackFrame.frameId,
|
|
568
|
-
stoppedLocation: (
|
|
571
|
+
stoppedLocation: ( new Range(
|
|
569
572
|
stackFrame.range.startLineNumber,
|
|
570
573
|
stackFrame.range.startColumn + 1,
|
|
571
574
|
stackFrame.range.endLineNumber,
|
|
572
575
|
stackFrame.range.endColumn + 1
|
|
573
|
-
))
|
|
576
|
+
))
|
|
574
577
|
};
|
|
575
578
|
const providers = this.languageFeaturesService.inlineValuesProvider.ordered(model).reverse();
|
|
576
579
|
allDecorations = [];
|
|
577
|
-
const lineDecorations = (
|
|
578
|
-
const promises = providers.flatMap(provider => (
|
|
580
|
+
const lineDecorations = ( new Map());
|
|
581
|
+
const promises = providers.flatMap(provider => ( viewRanges.map(
|
|
579
582
|
range => Promise.resolve(provider.provideInlineValues(model, range, ctx, cts.token)).then(async (result) => {
|
|
580
583
|
if (result) {
|
|
581
584
|
for (const iv of result) {
|
|
@@ -603,7 +606,7 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
603
606
|
expr = lineContent.substring(iv.range.startColumn - 1, iv.range.endColumn - 1);
|
|
604
607
|
}
|
|
605
608
|
if (expr) {
|
|
606
|
-
const expression = (
|
|
609
|
+
const expression = ( new Expression(expr));
|
|
607
610
|
await expression.evaluate(stackFrame.thread.session, stackFrame, 'watch', true);
|
|
608
611
|
if (expression.available) {
|
|
609
612
|
text = format(var_value_format, expr, expression.value);
|
|
@@ -619,8 +622,8 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
619
622
|
lineSegments = [];
|
|
620
623
|
lineDecorations.set(line, lineSegments);
|
|
621
624
|
}
|
|
622
|
-
if (!(
|
|
623
|
-
lineSegments.push((
|
|
625
|
+
if (!( lineSegments.some(iv => iv.text === text))) {
|
|
626
|
+
lineSegments.push(( new InlineSegment(iv.range.startColumn, text)));
|
|
624
627
|
}
|
|
625
628
|
}
|
|
626
629
|
}
|
|
@@ -628,29 +631,29 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
628
631
|
}, err => {
|
|
629
632
|
onUnexpectedExternalError(err);
|
|
630
633
|
})
|
|
631
|
-
)))
|
|
634
|
+
)));
|
|
632
635
|
const startTime = Date.now();
|
|
633
636
|
await Promise.all(promises);
|
|
634
637
|
this.updateInlineValuesScheduler.delay = this.debounceInfo.update(model, Date.now() - startTime);
|
|
635
638
|
lineDecorations.forEach((segments, line) => {
|
|
636
639
|
if (segments.length > 0) {
|
|
637
640
|
segments = segments.sort((a, b) => a.column - b.column);
|
|
638
|
-
const text = (
|
|
641
|
+
const text = ( segments.map(s => s.text)).join(separator);
|
|
639
642
|
allDecorations.push(...createInlineValueDecoration(line, text));
|
|
640
643
|
}
|
|
641
644
|
});
|
|
642
645
|
}
|
|
643
646
|
else {
|
|
644
647
|
const scopes = await stackFrame.getMostSpecificScopes(stackFrame.range);
|
|
645
|
-
const scopesWithVariables = await Promise.all((
|
|
646
|
-
const valuesPerLine = (
|
|
648
|
+
const scopesWithVariables = await Promise.all(( scopes.map(async (scope) => ({ scope, variables: await scope.getChildren() }))));
|
|
649
|
+
const valuesPerLine = ( new Map());
|
|
647
650
|
for (const { scope, variables } of scopesWithVariables) {
|
|
648
|
-
let scopeRange = (
|
|
651
|
+
let scopeRange = ( new Range(0, 0, stackFrame.range.startLineNumber, stackFrame.range.startColumn));
|
|
649
652
|
if (scope.range) {
|
|
650
653
|
scopeRange = scopeRange.setStartPosition(scope.range.startLineNumber, scope.range.startColumn);
|
|
651
654
|
}
|
|
652
|
-
const ownRanges = (
|
|
653
|
-
this._wordToLineNumbersMap ??= (
|
|
655
|
+
const ownRanges = ( viewRanges.map(r => r.intersectRanges(scopeRange))).filter(isDefined);
|
|
656
|
+
this._wordToLineNumbersMap ??= ( new WordsToLineNumbersCache(model));
|
|
654
657
|
for (const range of ownRanges) {
|
|
655
658
|
this._wordToLineNumbersMap.ensureRangePopulated(range);
|
|
656
659
|
}
|
|
@@ -658,32 +661,32 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
658
661
|
for (const { line, variables } of mapped) {
|
|
659
662
|
let values = valuesPerLine.get(line);
|
|
660
663
|
if (!values) {
|
|
661
|
-
values = (
|
|
664
|
+
values = ( new Map());
|
|
662
665
|
valuesPerLine.set(line, values);
|
|
663
666
|
}
|
|
664
667
|
for (const { name, value } of variables) {
|
|
665
|
-
if (!(
|
|
668
|
+
if (!( values.has(name))) {
|
|
666
669
|
values.set(name, value);
|
|
667
670
|
}
|
|
668
671
|
}
|
|
669
672
|
}
|
|
670
673
|
}
|
|
671
|
-
allDecorations = [...valuesPerLine.entries()].flatMap(([line, values]) => createInlineValueDecoration(line, (
|
|
674
|
+
allDecorations = [...valuesPerLine.entries()].flatMap(([line, values]) => createInlineValueDecoration(line, ( [...values].map(([n, v]) => `${n} = ${v}`)).join(', ')));
|
|
672
675
|
}
|
|
673
676
|
if (cts.token.isCancellationRequested) {
|
|
674
677
|
return;
|
|
675
678
|
}
|
|
676
679
|
let preservePosition;
|
|
677
|
-
if (this.editor.getOption(
|
|
680
|
+
if (this.editor.getOption(EditorOption.wordWrap) !== 'off') {
|
|
678
681
|
const position = this.editor.getPosition();
|
|
679
|
-
if (position && (
|
|
682
|
+
if (position && ( this.editor.getVisibleRanges().some(r => r.containsPosition(position)))) {
|
|
680
683
|
preservePosition = { position, top: this.editor.getTopForPosition(position.lineNumber, position.column) };
|
|
681
684
|
}
|
|
682
685
|
}
|
|
683
686
|
this.oldDecorations.set(allDecorations);
|
|
684
687
|
if (preservePosition) {
|
|
685
688
|
const top = this.editor.getTopForPosition(preservePosition.position.lineNumber, preservePosition.position.column);
|
|
686
|
-
this.editor.setScrollTop(this.editor.getScrollTop() - (preservePosition.top - top),
|
|
689
|
+
this.editor.setScrollTop(this.editor.getScrollTop() - (preservePosition.top - top), ScrollType.Immediate);
|
|
687
690
|
}
|
|
688
691
|
}
|
|
689
692
|
dispose() {
|
|
@@ -696,31 +699,31 @@ let DebugEditorContribution = class DebugEditorContribution {
|
|
|
696
699
|
this.toDispose = dispose(this.toDispose);
|
|
697
700
|
}
|
|
698
701
|
};
|
|
699
|
-
DebugEditorContribution.__decorator = (
|
|
702
|
+
DebugEditorContribution.__decorator = ( __decorate([
|
|
700
703
|
memoize
|
|
701
|
-
], DebugEditorContribution.prototype, "showHoverScheduler", null))
|
|
702
|
-
DebugEditorContribution.__decorator = (
|
|
704
|
+
], DebugEditorContribution.prototype, "showHoverScheduler", null));
|
|
705
|
+
DebugEditorContribution.__decorator = ( __decorate([
|
|
703
706
|
memoize
|
|
704
|
-
], DebugEditorContribution.prototype, "removeInlineValuesScheduler", null))
|
|
705
|
-
DebugEditorContribution.__decorator = (
|
|
707
|
+
], DebugEditorContribution.prototype, "removeInlineValuesScheduler", null));
|
|
708
|
+
DebugEditorContribution.__decorator = ( __decorate([
|
|
706
709
|
memoize
|
|
707
|
-
], DebugEditorContribution.prototype, "updateInlineValuesScheduler", null))
|
|
708
|
-
DebugEditorContribution = (
|
|
709
|
-
(
|
|
710
|
-
(
|
|
711
|
-
(
|
|
712
|
-
(
|
|
713
|
-
(
|
|
714
|
-
(
|
|
715
|
-
(
|
|
716
|
-
(
|
|
717
|
-
(
|
|
718
|
-
], DebugEditorContribution))
|
|
710
|
+
], DebugEditorContribution.prototype, "updateInlineValuesScheduler", null));
|
|
711
|
+
DebugEditorContribution = ( __decorate([
|
|
712
|
+
( __param(1, IDebugService)),
|
|
713
|
+
( __param(2, IInstantiationService)),
|
|
714
|
+
( __param(3, ICommandService)),
|
|
715
|
+
( __param(4, IConfigurationService)),
|
|
716
|
+
( __param(5, IHostService)),
|
|
717
|
+
( __param(6, IUriIdentityService)),
|
|
718
|
+
( __param(7, IContextKeyService)),
|
|
719
|
+
( __param(8, ILanguageFeaturesService)),
|
|
720
|
+
( __param(9, ILanguageFeatureDebounceService))
|
|
721
|
+
], DebugEditorContribution));
|
|
719
722
|
class WordsToLineNumbersCache {
|
|
720
723
|
constructor(model) {
|
|
721
724
|
this.model = model;
|
|
722
|
-
this.value = (
|
|
723
|
-
this.intervals = (
|
|
725
|
+
this.value = ( new Map());
|
|
726
|
+
this.intervals = ( new Uint8Array(Math.ceil(model.getLineCount() / 8)));
|
|
724
727
|
}
|
|
725
728
|
ensureRangePopulated(range) {
|
|
726
729
|
for (let lineNumber = range.startLineNumber; lineNumber <= range.endLineNumber; lineNumber++) {
|
|
@@ -746,9 +749,9 @@ CommandsRegistry.registerCommand('_executeInlineValueProvider', async (accessor,
|
|
|
746
749
|
const range = Range.lift(iRange);
|
|
747
750
|
const { inlineValuesProvider } = accessor.get(ILanguageFeaturesService);
|
|
748
751
|
const providers = inlineValuesProvider.ordered(model);
|
|
749
|
-
const providerResults = await Promise.all((
|
|
752
|
+
const providerResults = await Promise.all(( providers.map(
|
|
750
753
|
provider => provider.provideInlineValues(model, range, context, CancellationToken.None)
|
|
751
|
-
)))
|
|
754
|
+
)));
|
|
752
755
|
return providerResults.flat().filter(isDefined);
|
|
753
756
|
});
|
|
754
757
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { IMouseEvent } from "vscode/vscode/vs/base/browser/mouseEvent";
|
|
2
|
+
import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from "vscode/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
+
import { IDimension } from "vscode/vscode/vs/editor/common/core/dimension";
|
|
4
|
+
import { Position } from "vscode/vscode/vs/editor/common/core/position";
|
|
5
|
+
import { IMenuService } from "vscode/vscode/vs/platform/actions/common/actions.service";
|
|
6
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
|
+
import { IContextMenuService } from "vscode/vscode/vs/platform/contextview/browser/contextView.service";
|
|
8
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { IExpression, IStackFrame } from "vscode/vscode/vs/workbench/contrib/debug/common/debug";
|
|
10
|
+
import { IDebugService } from "vscode/vscode/vs/workbench/contrib/debug/common/debug.service";
|
|
11
|
+
export declare enum ShowDebugHoverResult {
|
|
12
|
+
NOT_CHANGED = 0,
|
|
13
|
+
NOT_AVAILABLE = 1,
|
|
14
|
+
CANCELLED = 2
|
|
15
|
+
}
|
|
16
|
+
export declare function findExpressionInStackFrame(stackFrame: IStackFrame, namesToFind: string[]): Promise<IExpression | undefined>;
|
|
17
|
+
export declare class DebugHoverWidget implements IContentWidget {
|
|
18
|
+
private editor;
|
|
19
|
+
private readonly debugService;
|
|
20
|
+
private readonly instantiationService;
|
|
21
|
+
private readonly menuService;
|
|
22
|
+
private readonly contextKeyService;
|
|
23
|
+
private readonly contextMenuService;
|
|
24
|
+
static readonly ID = "debug.hoverWidget";
|
|
25
|
+
readonly allowEditorOverflow = true;
|
|
26
|
+
private _isVisible?;
|
|
27
|
+
private safeTriangle?;
|
|
28
|
+
private showCancellationSource?;
|
|
29
|
+
private domNode;
|
|
30
|
+
private tree;
|
|
31
|
+
private showAtPosition;
|
|
32
|
+
private positionPreference;
|
|
33
|
+
private readonly highlightDecorations;
|
|
34
|
+
private complexValueContainer;
|
|
35
|
+
private complexValueTitle;
|
|
36
|
+
private valueContainer;
|
|
37
|
+
private treeContainer;
|
|
38
|
+
private toDispose;
|
|
39
|
+
private scrollbar;
|
|
40
|
+
private debugHoverComputer;
|
|
41
|
+
private expressionRenderer;
|
|
42
|
+
private expressionToRender;
|
|
43
|
+
private isUpdatingTree;
|
|
44
|
+
get isShowingComplexValue(): boolean;
|
|
45
|
+
constructor(editor: ICodeEditor, debugService: IDebugService, instantiationService: IInstantiationService, menuService: IMenuService, contextKeyService: IContextKeyService, contextMenuService: IContextMenuService);
|
|
46
|
+
private create;
|
|
47
|
+
private onContextMenu;
|
|
48
|
+
private registerListeners;
|
|
49
|
+
isHovered(): boolean;
|
|
50
|
+
isVisible(): boolean;
|
|
51
|
+
willBeVisible(): boolean;
|
|
52
|
+
getId(): string;
|
|
53
|
+
getDomNode(): HTMLElement;
|
|
54
|
+
isInSafeTriangle(x: number, y: number): boolean | undefined;
|
|
55
|
+
showAt(position: Position, focus: boolean, mouseEvent?: IMouseEvent): Promise<void | ShowDebugHoverResult>;
|
|
56
|
+
private static readonly _HOVER_HIGHLIGHT_DECORATION_OPTIONS;
|
|
57
|
+
private doShow;
|
|
58
|
+
private layoutTreeAndContainer;
|
|
59
|
+
private layoutTree;
|
|
60
|
+
beforeRender(): IDimension | null;
|
|
61
|
+
afterRender(positionPreference: ContentWidgetPositionPreference | null): void;
|
|
62
|
+
hide(): void;
|
|
63
|
+
getPosition(): IContentWidgetPosition | null;
|
|
64
|
+
dispose(): void;
|
|
65
|
+
}
|