@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.
Files changed (115) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +27 -1
  3. package/package.json +42 -8
  4. package/service-override/tools/debugAssets.d.ts +1 -0
  5. package/service-override/tools/debugAssets.js +5 -0
  6. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.d.ts +28 -0
  7. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +1 -0
  8. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.d.ts +79 -0
  9. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +24 -22
  10. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.d.ts +45 -0
  11. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +108 -132
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.d.ts +1 -0
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +208 -264
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.d.ts +50 -0
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +46 -40
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.d.ts +71 -0
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +72 -54
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.d.ts +91 -0
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +151 -148
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.d.ts +14 -0
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +10 -9
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.d.ts +22 -0
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +65 -107
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.d.ts +64 -0
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +108 -105
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.d.ts +65 -0
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +49 -37
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.d.ts +37 -0
  29. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +11 -10
  30. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.d.ts +9 -0
  31. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +4 -2
  32. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.d.ts +14 -0
  33. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +24 -22
  34. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.d.ts +160 -0
  35. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +194 -169
  36. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.d.ts +206 -0
  37. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +150 -173
  38. package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.d.ts +1 -0
  39. package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +1 -0
  40. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.d.ts +14 -0
  41. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +14 -11
  42. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.d.ts +36 -0
  43. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +76 -68
  44. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.d.ts +9 -0
  45. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +4 -2
  46. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.d.ts +54 -0
  47. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +70 -94
  48. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.d.ts +45 -0
  49. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +59 -84
  50. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.d.ts +64 -0
  51. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +61 -60
  52. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.d.ts +18 -0
  53. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +19 -17
  54. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.d.ts +19 -0
  55. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +7 -4
  56. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.d.ts +36 -0
  57. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +55 -53
  58. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
  59. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +1 -1
  60. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +1 -1
  61. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +1 -1
  62. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +1 -1
  63. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.d.ts +120 -0
  65. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +62 -61
  66. package/vscode/src/vs/workbench/contrib/debug/browser/repl.d.ts +107 -0
  67. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +148 -155
  68. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.d.ts +26 -0
  69. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +39 -38
  70. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.d.ts +39 -0
  71. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +8 -5
  72. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.d.ts +9 -0
  73. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +6 -4
  74. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.d.ts +131 -0
  75. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +42 -40
  76. package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.d.ts +28 -0
  77. package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +74 -76
  78. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.d.ts +25 -0
  79. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +16 -14
  80. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.d.ts +78 -0
  81. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +74 -75
  82. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.d.ts +57 -0
  83. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +63 -63
  84. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.d.ts +26 -0
  85. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +53 -66
  86. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.d.ts +10 -0
  87. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -1
  88. package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.d.ts +16 -0
  89. package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +3 -2
  90. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.d.ts +6 -0
  91. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +1 -0
  92. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.d.ts +21 -0
  93. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +16 -15
  94. package/vscode/src/vs/workbench/contrib/debug/common/debugContext.d.ts +6 -0
  95. package/vscode/src/vs/workbench/contrib/debug/common/debugContext.js +1 -0
  96. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.d.ts +15 -0
  97. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +11 -10
  98. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.d.ts +7 -0
  99. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +51 -50
  100. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.d.ts +34 -0
  101. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +26 -22
  102. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.d.ts +10 -0
  103. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +2 -1
  104. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.d.ts +77 -0
  105. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +1 -0
  106. package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.d.ts +55 -0
  107. package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +3 -2
  108. package/vscode/src/vs/workbench/contrib/debug/common/debugger.d.ts +52 -0
  109. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +83 -84
  110. package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.d.ts +9 -0
  111. package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +2 -1
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.d.ts +2 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +5 -4
  114. package/debug.js +0 -26
  115. package/tools/debugAssets.js +0 -4
@@ -1,4 +1,5 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
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-debug-notebook-common/vscode/vs/workbench/contrib/debug/common/debugModel';
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(5920, "Color for the debug inline value text.")));
64
- registerColor('editor.inlineValuesBackground', '#ffc80033', ( localize(5921, "Color for the debug inline value background.")));
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 = 1073741824 ) {
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 = ( (new Map()));
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 = ( (new Map()));
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 (( (ranges.some(r => lineNumber >= r.startLineNumber && lineNumber <= r.endLineNumber)))) {
129
- if (!( (lineToNamesMap.has(lineNumber)))) {
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
- ([...lineToNamesMap].map(([line, names]) => ({
141
- line,
142
- variables: ( (names.sort((first, second) => {
143
- const content = model.getLineContent(line);
144
- return content.indexOf(first) - content.indexOf(second);
145
- }).map(name => ({ name, value: nameValueMap.get(name) }))))
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 === 0 ) {
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 (!( (result.has(word)))) {
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 = ( (new MutableDisposable()));
193
+ this.altListener = ( new MutableDisposable());
188
194
  this.altPressed = false;
189
195
  this.oldDecorations = this.editor.createDecorationsCollection();
190
- this.displayedStore = ( (new DisposableStore()));
191
- this.defaultHoverLockout = ( (new MutableDisposable()));
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 && ( (this.languageFeaturesService.inlineValuesProvider.has(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 !== 2 ) {
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 = ( (new StandardKeyboardEvent(keydownEvent)));
272
- if (standardKeyboardEvent.keyCode === 6 ) {
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 = ( (new DomEmitter(ownerDocument, 'keyup')));
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 = ( (new StandardKeyboardEvent(keyupEvent)));
290
+ standardKeyboardEvent = ( new StandardKeyboardEvent(keyupEvent));
285
291
  }
286
- if (!standardKeyboardEvent || standardKeyboardEvent.keyCode === 6 ) {
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 === 1 ) {
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 = ( (new Range(position.lineNumber, position.column, position.lineNumber, position.column)));
333
+ const range = ( new Range(position.lineNumber, position.column, position.lineNumber, position.column));
328
334
  this.defaultHoverLockout.clear();
329
- hoverController?.showContentHover(range, 1 , 0 , focus);
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 = ( (new RunOnceScheduler(() => {
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 === 9 && mouseEvent.target.detail === DebugHoverWidget.ID) {
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 !== 2 ) {
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 === 2 ) {
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 === 9 && target.detail === DebugHoverWidget.ID && !mouseEvent.event[stopKey]) {
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 === 6 ) {
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 ? 57 : 5 ;
407
- if (e.keyCode !== stopKey && e.keyCode !== 6 ) {
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 = ( (new 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
- (new RunOnceScheduler(() => {
521
- this.displayedStore.clear();
522
- this.oldDecorations.clear();
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
- (new RunOnceScheduler(
530
- async () => await this.updateInlineValueDecorations(this.debugService.getViewModel().focusedStackFrame),
531
- model ? this.debounceInfo.get(model) : DEAFULT_INLINE_DEBOUNCE_DELAY
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 && ( (this.languageFeaturesService.inlineValuesProvider.has(model))));
541
- if (!inlineValuesTurnedOn || !model || !stackFrame || ( (model.uri.toString())) !== ( (stackFrame.source.uri.toString()))) {
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 = ( (new CancellationTokenSource()));
554
+ const cts = ( new CancellationTokenSource());
552
555
  this.displayedStore.add(toDisposable(() => cts.dispose(true)));
553
- if (( (this.languageFeaturesService.inlineValuesProvider.has(model)))) {
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: ( (new Range(
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 = ( (new Map()));
578
- const promises = providers.flatMap(provider => ( (viewRanges.map(
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 = ( (new Expression(expr)));
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 (!( (lineSegments.some(iv => iv.text === text)))) {
623
- lineSegments.push(( (new InlineSegment(iv.range.startColumn, text))));
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 = ( (segments.map(s => s.text))).join(separator);
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(( (scopes.map(async (scope) => ({ scope, variables: await scope.getChildren() })))));
646
- const valuesPerLine = ( (new Map()));
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 = ( (new Range(0, 0, stackFrame.range.startLineNumber, stackFrame.range.startColumn)));
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 = ( (viewRanges.map(r => r.intersectRanges(scopeRange)))).filter(isDefined);
653
- this._wordToLineNumbersMap ??= ( (new WordsToLineNumbersCache(model)));
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 = ( (new Map()));
664
+ values = ( new Map());
662
665
  valuesPerLine.set(line, values);
663
666
  }
664
667
  for (const { name, value } of variables) {
665
- if (!( (values.has(name)))) {
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, ( ([...values].map(([n, v]) => `${n} = ${v}`))).join(', ')));
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(135 ) !== 'off') {
680
+ if (this.editor.getOption(EditorOption.wordWrap) !== 'off') {
678
681
  const position = this.editor.getPosition();
679
- if (position && ( (this.editor.getVisibleRanges().some(r => r.containsPosition(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), 1 );
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 = ( (__decorate([
702
+ DebugEditorContribution.__decorator = ( __decorate([
700
703
  memoize
701
- ], DebugEditorContribution.prototype, "showHoverScheduler", null)));
702
- DebugEditorContribution.__decorator = ( (__decorate([
704
+ ], DebugEditorContribution.prototype, "showHoverScheduler", null));
705
+ DebugEditorContribution.__decorator = ( __decorate([
703
706
  memoize
704
- ], DebugEditorContribution.prototype, "removeInlineValuesScheduler", null)));
705
- DebugEditorContribution.__decorator = ( (__decorate([
707
+ ], DebugEditorContribution.prototype, "removeInlineValuesScheduler", null));
708
+ DebugEditorContribution.__decorator = ( __decorate([
706
709
  memoize
707
- ], DebugEditorContribution.prototype, "updateInlineValuesScheduler", null)));
708
- DebugEditorContribution = ( (__decorate([
709
- ( (__param(1, IDebugService))),
710
- ( (__param(2, IInstantiationService))),
711
- ( (__param(3, ICommandService))),
712
- ( (__param(4, IConfigurationService))),
713
- ( (__param(5, IHostService))),
714
- ( (__param(6, IUriIdentityService))),
715
- ( (__param(7, IContextKeyService))),
716
- ( (__param(8, ILanguageFeaturesService))),
717
- ( (__param(9, ILanguageFeatureDebounceService)))
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 = ( (new Map()));
723
- this.intervals = ( (new Uint8Array(Math.ceil(model.getLineCount() / 8))));
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(( (providers.map(
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
+ }