@codingame/monaco-vscode-debug-service-override 5.3.0 → 6.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 (33) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +5 -5
  3. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +26 -23
  4. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +8 -5
  5. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +2 -1
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +23 -20
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +12 -11
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +38 -19
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +22 -12
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +10 -10
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +2 -1
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +4 -3
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +76 -57
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +13 -11
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +4 -2
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +23 -16
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +2 -1
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +15 -13
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +3 -3
  20. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +8 -6
  21. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +3 -2
  22. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +5 -3
  23. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +3 -2
  24. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +5 -4
  25. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +29 -26
  26. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +3 -2
  27. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +7 -6
  28. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +7 -6
  29. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +12 -11
  30. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +3 -2
  31. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +21 -20
  32. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +5 -3
  33. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +1 -0
@@ -10,23 +10,30 @@ import { onUnexpectedExternalError, illegalArgument } from 'vscode/vscode/vs/bas
10
10
  import { Event } from 'vscode/vscode/vs/base/common/event';
11
11
  import { visit } from 'vscode/vscode/vs/base/common/json';
12
12
  import { setProperty } from 'vscode/vscode/vs/base/common/jsonEdit';
13
+ import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
13
14
  import { MutableDisposable, DisposableStore, toDisposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
14
15
  import { clamp } from 'vscode/vscode/vs/base/common/numbers';
15
16
  import { basename } from 'vscode/vscode/vs/base/common/path';
16
17
  import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
17
18
  import { noBreakWhitespace, format } from 'vscode/vscode/vs/base/common/strings';
18
19
  import { isDefined, assertType } from 'vscode/vscode/vs/base/common/types';
20
+ import { Constants } from 'vscode/vscode/vs/base/common/uint';
19
21
  import { URI } from 'vscode/vscode/vs/base/common/uri';
20
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';
21
25
  import { EditOperation } from 'vscode/vscode/vs/editor/common/core/editOperation';
22
26
  import { Position } from 'vscode/vscode/vs/editor/common/core/position';
23
27
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
24
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';
25
31
  import { InjectedTextCursorStops } from 'vscode/vscode/vs/editor/common/model';
26
32
  import { ILanguageFeatureDebounceService } from 'vscode/vscode/vs/editor/common/services/languageFeatureDebounce';
27
33
  import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
28
34
  import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
29
35
  import { HoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/hoverController';
36
+ import { HoverStartMode, HoverStartSource } from 'vscode/vscode/vs/editor/contrib/hover/browser/hoverOperation';
30
37
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
31
38
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
32
39
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
@@ -45,9 +52,9 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
45
52
  import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
46
53
  import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
47
54
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
48
- import { DebugHoverWidget } from './debugHover.js';
55
+ import { DebugHoverWidget, ShowDebugHoverResult } from './debugHover.js';
49
56
  import { ExceptionWidget } from './exceptionWidget.js';
50
- 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';
51
58
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
52
59
  import { Expression } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
53
60
  import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
@@ -75,7 +82,7 @@ class InlineSegment {
75
82
  this.text = text;
76
83
  }
77
84
  }
78
- function createInlineValueDecoration(lineNumber, contentText, column = 1073741824 ) {
85
+ function createInlineValueDecoration(lineNumber, contentText, column = Constants.MAX_SAFE_SMALL_INTEGER) {
79
86
  if (contentText.length > MAX_INLINE_DECORATOR_LENGTH) {
80
87
  contentText = contentText.substring(0, MAX_INLINE_DECORATOR_LENGTH) + '...';
81
88
  }
@@ -163,7 +170,7 @@ function getWordToLineNumbersMap(model, lineNumber, result) {
163
170
  const lineTokens = model.tokenization.getLineTokens(lineNumber);
164
171
  for (let tokenIndex = 0, tokenCount = lineTokens.getCount(); tokenIndex < tokenCount; tokenIndex++) {
165
172
  const tokenType = lineTokens.getStandardTokenType(tokenIndex);
166
- if (tokenType === 0 ) {
173
+ if (tokenType === StandardTokenType.Other) {
167
174
  DEFAULT_WORD_REGEXP.lastIndex = 0;
168
175
  const tokenStartOffset = lineTokens.getStartOffset(tokenIndex);
169
176
  const tokenEndOffset = lineTokens.getEndOffset(tokenIndex);
@@ -247,7 +254,7 @@ let DebugEditorContribution = class DebugEditorContribution {
247
254
  }
248
255
  }));
249
256
  this.toDispose.push(this.debugService.onDidChangeState((state) => {
250
- if (state !== 2 ) {
257
+ if (state !== State.Stopped) {
251
258
  this.toggleExceptionWidget();
252
259
  }
253
260
  }));
@@ -277,7 +284,7 @@ let DebugEditorContribution = class DebugEditorContribution {
277
284
  const ownerDocument = this.editor.getContainerDomNode().ownerDocument;
278
285
  this.altListener.value = addDisposableListener(ownerDocument, 'keydown', keydownEvent => {
279
286
  const standardKeyboardEvent = ( (new StandardKeyboardEvent(keydownEvent)));
280
- if (standardKeyboardEvent.keyCode === 6 ) {
287
+ if (standardKeyboardEvent.keyCode === KeyCode.Alt) {
281
288
  this.altPressed = true;
282
289
  const debugHoverWasVisible = this.hoverWidget.isVisible();
283
290
  this.hoverWidget.hide();
@@ -291,7 +298,7 @@ let DebugEditorContribution = class DebugEditorContribution {
291
298
  if (isKeyboardEvent(keyupEvent)) {
292
299
  standardKeyboardEvent = ( (new StandardKeyboardEvent(keyupEvent)));
293
300
  }
294
- if (!standardKeyboardEvent || standardKeyboardEvent.keyCode === 6 ) {
301
+ if (!standardKeyboardEvent || standardKeyboardEvent.keyCode === KeyCode.Alt) {
295
302
  this.altPressed = false;
296
303
  this.preventDefaultEditorHover();
297
304
  listener.dispose();
@@ -307,7 +314,7 @@ let DebugEditorContribution = class DebugEditorContribution {
307
314
  const model = this.editor.getModel();
308
315
  if (sf && model && this.uriIdentityService.extUri.isEqual(sf.source.uri, model.uri)) {
309
316
  const result = await this.hoverWidget.showAt(position, focus);
310
- if (result === 1 ) {
317
+ if (result === ShowDebugHoverResult.NOT_AVAILABLE) {
311
318
  this.showEditorHover(position, focus);
312
319
  }
313
320
  }
@@ -334,7 +341,7 @@ let DebugEditorContribution = class DebugEditorContribution {
334
341
  const hoverController = this.editor.getContribution(HoverController.ID);
335
342
  const range = ( (new Range(position.lineNumber, position.column, position.lineNumber, position.column)));
336
343
  this.defaultHoverLockout.clear();
337
- hoverController?.showContentHover(range, 1 , 0 , focus);
344
+ hoverController?.showContentHover(range, HoverStartMode.Immediate, HoverStartSource.Mouse, focus);
338
345
  }
339
346
  async onFocusStackFrame(sf) {
340
347
  const model = this.editor.getModel();
@@ -372,19 +379,19 @@ let DebugEditorContribution = class DebugEditorContribution {
372
379
  }
373
380
  onEditorMouseDown(mouseEvent) {
374
381
  this.mouseDown = true;
375
- if (mouseEvent.target.type === 9 && mouseEvent.target.detail === DebugHoverWidget.ID) {
382
+ if (mouseEvent.target.type === MouseTargetType.CONTENT_WIDGET && mouseEvent.target.detail === DebugHoverWidget.ID) {
376
383
  return;
377
384
  }
378
385
  this.hideHoverWidget();
379
386
  }
380
387
  onEditorMouseMove(mouseEvent) {
381
- if (this.debugService.state !== 2 ) {
388
+ if (this.debugService.state !== State.Stopped) {
382
389
  return;
383
390
  }
384
391
  const target = mouseEvent.target;
385
392
  const stopKey = isMacintosh ? 'metaKey' : 'ctrlKey';
386
393
  if (!this.altPressed) {
387
- if (target.type === 2 ) {
394
+ if (target.type === MouseTargetType.GUTTER_GLYPH_MARGIN) {
388
395
  this.defaultHoverLockout.clear();
389
396
  this.gutterIsHovered = true;
390
397
  }
@@ -393,13 +400,13 @@ let DebugEditorContribution = class DebugEditorContribution {
393
400
  this.updateHoverConfiguration();
394
401
  }
395
402
  }
396
- if (target.type === 9 && target.detail === DebugHoverWidget.ID && !mouseEvent.event[stopKey]) {
403
+ if (target.type === MouseTargetType.CONTENT_WIDGET && target.detail === DebugHoverWidget.ID && !mouseEvent.event[stopKey]) {
397
404
  const sticky = this.editorHoverOptions?.sticky ?? true;
398
405
  if (sticky || this.hoverWidget.isShowingComplexValue) {
399
406
  return;
400
407
  }
401
408
  }
402
- if (target.type === 6 ) {
409
+ if (target.type === MouseTargetType.CONTENT_TEXT) {
403
410
  if (target.position && !Position.equals(target.position, this.hoverPosition)) {
404
411
  this.hoverPosition = target.position;
405
412
  this.preventDefaultEditorHover();
@@ -411,8 +418,8 @@ let DebugEditorContribution = class DebugEditorContribution {
411
418
  }
412
419
  }
413
420
  onKeyDown(e) {
414
- const stopKey = isMacintosh ? 57 : 5 ;
415
- if (e.keyCode !== stopKey && e.keyCode !== 6 ) {
421
+ const stopKey = isMacintosh ? KeyCode.Meta : KeyCode.Ctrl;
422
+ if (e.keyCode !== stopKey && e.keyCode !== KeyCode.Alt) {
416
423
  this.hideHoverWidget();
417
424
  }
418
425
  }
@@ -527,6 +534,7 @@ let DebugEditorContribution = class DebugEditorContribution {
527
534
  return (
528
535
  (new RunOnceScheduler(() => {
529
536
  this.displayedStore.clear();
537
+ this.oldDecorations.clear();
530
538
  }, 100))
531
539
  );
532
540
  }
@@ -665,9 +673,20 @@ let DebugEditorContribution = class DebugEditorContribution {
665
673
  allDecorations = distinct(decorationsPerScope.flat(),
666
674
  decoration => `${decoration.range.startLineNumber}:${decoration?.options.after?.content}`);
667
675
  }
668
- if (!cts.token.isCancellationRequested) {
669
- this.oldDecorations.set(allDecorations);
670
- this.displayedStore.add(toDisposable(() => this.oldDecorations.clear()));
676
+ if (cts.token.isCancellationRequested) {
677
+ return;
678
+ }
679
+ let preservePosition;
680
+ if (this.editor.getOption(EditorOption.wordWrap) !== 'off') {
681
+ const position = this.editor.getPosition();
682
+ if (position && ( (this.editor.getVisibleRanges().some(r => r.containsPosition(position))))) {
683
+ preservePosition = { position, top: this.editor.getTopForPosition(position.lineNumber, position.column) };
684
+ }
685
+ }
686
+ this.oldDecorations.set(allDecorations);
687
+ if (preservePosition) {
688
+ const top = this.editor.getTopForPosition(preservePosition.position.lineNumber, preservePosition.position.column);
689
+ this.editor.setScrollTop(this.editor.getScrollTop() - (preservePosition.top - top), ScrollType.Immediate);
671
690
  }
672
691
  }
673
692
  dispose() {
@@ -3,9 +3,13 @@ import { $ as $$1, append, addStandardDisposableListener, isAncestorOfActiveElem
3
3
  import { DomScrollableElement } from 'vscode/vscode/vs/base/browser/ui/scrollbar/scrollableElement';
4
4
  import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
5
5
  import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
6
+ import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
6
7
  import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
7
8
  import { clamp } from 'vscode/vscode/vs/base/common/numbers';
8
9
  import { isMacintosh } from 'vscode/vscode/vs/base/common/platform';
10
+ import { ScrollbarVisibility } from 'vscode/vscode/vs/base/common/scrollable';
11
+ import { ContentWidgetPositionPreference } from 'vscode/vscode/vs/editor/browser/editorBrowser';
12
+ import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
9
13
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
10
14
  import { ModelDecorationOptions } from 'vscode/vscode/vs/editor/common/model/textModel';
11
15
  import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
@@ -39,6 +43,12 @@ import { getEvaluatableExpressionAtPosition } from 'vscode/vscode/vs/workbench/c
39
43
  var DebugHoverWidget_1;
40
44
  const _moduleId = "vs/workbench/contrib/debug/browser/debugHover";
41
45
  const $ = $$1;
46
+ var ShowDebugHoverResult;
47
+ ( ((function(ShowDebugHoverResult) {
48
+ ShowDebugHoverResult[ShowDebugHoverResult["NOT_CHANGED"] = 0] = "NOT_CHANGED";
49
+ ShowDebugHoverResult[ShowDebugHoverResult["NOT_AVAILABLE"] = 1] = "NOT_AVAILABLE";
50
+ ShowDebugHoverResult[ShowDebugHoverResult["CANCELLED"] = 2] = "CANCELLED";
51
+ })(ShowDebugHoverResult || (ShowDebugHoverResult = {}))));
42
52
  async function doFindExpression(container, namesToFind) {
43
53
  if (!container) {
44
54
  return null;
@@ -81,7 +91,7 @@ let DebugHoverWidget = class DebugHoverWidget {
81
91
  this.toDispose = [];
82
92
  this._isVisible = false;
83
93
  this.showAtPosition = null;
84
- this.positionPreference = [1 , 2 ];
94
+ this.positionPreference = [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW];
85
95
  this.debugHoverComputer = this.instantiationService.createInstance(DebugHoverComputer, this.editor);
86
96
  }
87
97
  create() {
@@ -116,7 +126,7 @@ let DebugHoverWidget = class DebugHoverWidget {
116
126
  this.valueContainer = $('.value');
117
127
  this.valueContainer.tabIndex = 0;
118
128
  this.valueContainer.setAttribute('role', 'tooltip');
119
- this.scrollbar = ( (new DomScrollableElement(this.valueContainer, { horizontal: 2 })));
129
+ this.scrollbar = ( (new DomScrollableElement(this.valueContainer, { horizontal: ScrollbarVisibility.Hidden })));
120
130
  this.domNode.appendChild(this.scrollbar.getDomNode());
121
131
  this.toDispose.push(this.scrollbar);
122
132
  this.editor.applyFontInfo(this.domNode);
@@ -146,12 +156,12 @@ let DebugHoverWidget = class DebugHoverWidget {
146
156
  }
147
157
  registerListeners() {
148
158
  this.toDispose.push(addStandardDisposableListener(this.domNode, 'keydown', (e) => {
149
- if (e.equals(9 )) {
159
+ if (e.equals(KeyCode.Escape)) {
150
160
  this.hide();
151
161
  }
152
162
  }));
153
163
  this.toDispose.push(this.editor.onDidChangeConfiguration((e) => {
154
- if (e.hasChanged(50 )) {
164
+ if (e.hasChanged(EditorOption.fontInfo)) {
155
165
  this.editor.applyFontInfo(this.domNode);
156
166
  }
157
167
  }));
@@ -183,28 +193,28 @@ let DebugHoverWidget = class DebugHoverWidget {
183
193
  const session = this.debugService.getViewModel().focusedSession;
184
194
  if (!session || !this.editor.hasModel()) {
185
195
  this.hide();
186
- return 1 ;
196
+ return ShowDebugHoverResult.NOT_AVAILABLE;
187
197
  }
188
198
  const result = await this.debugHoverComputer.compute(position, cancellationSource.token);
189
199
  if (cancellationSource.token.isCancellationRequested) {
190
200
  this.hide();
191
- return 2 ;
201
+ return ShowDebugHoverResult.CANCELLED;
192
202
  }
193
203
  if (!result.range) {
194
204
  this.hide();
195
- return 1 ;
205
+ return ShowDebugHoverResult.NOT_AVAILABLE;
196
206
  }
197
207
  if (this.isVisible() && !result.rangeChanged) {
198
- return 0 ;
208
+ return ShowDebugHoverResult.NOT_CHANGED;
199
209
  }
200
210
  const expression = await this.debugHoverComputer.evaluate(session);
201
211
  if (cancellationSource.token.isCancellationRequested) {
202
212
  this.hide();
203
- return 2 ;
213
+ return ShowDebugHoverResult.CANCELLED;
204
214
  }
205
215
  if (!expression || (expression instanceof Expression && !expression.available)) {
206
216
  this.hide();
207
- return 1 ;
217
+ return ShowDebugHoverResult.NOT_AVAILABLE;
208
218
  }
209
219
  this.highlightDecorations.set([{
210
220
  range: result.range,
@@ -303,7 +313,7 @@ let DebugHoverWidget = class DebugHoverWidget {
303
313
  this._isVisible = false;
304
314
  this.highlightDecorations.clear();
305
315
  this.editor.layoutContentWidget(this);
306
- this.positionPreference = [1 , 2 ];
316
+ this.positionPreference = [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW];
307
317
  }
308
318
  getPosition() {
309
319
  return this._isVisible ? {
@@ -406,4 +416,4 @@ DebugHoverComputer = ( (__decorate([
406
416
  ( (__param(3, ILogService)))
407
417
  ], DebugHoverComputer)));
408
418
 
409
- export { DebugHoverWidget, findExpressionInStackFrame };
419
+ export { DebugHoverWidget, ShowDebugHoverResult, findExpressionInStackFrame };
@@ -3,8 +3,8 @@ import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
3
3
  import { toDisposable, DisposableStore, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
4
4
  import { clamp } from 'vscode/vscode/vs/base/common/numbers';
5
5
  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';
6
+ import { FileSystemProviderCapabilities, FileChangeType, FileType, FilePermission, createFileSystemProviderError, FileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
7
+ import { State, MemoryRangeType, DEBUG_MEMORY_SCHEME } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
8
8
 
9
9
  const rangeRe = /range=([0-9]+):([0-9]+)/;
10
10
  class DebugMemoryFileSystemProvider {
@@ -16,8 +16,8 @@ class DebugMemoryFileSystemProvider {
16
16
  this.onDidChangeCapabilities = Event.None;
17
17
  this.onDidChangeFile = this.changeEmitter.event;
18
18
  this.capabilities = 0
19
- | 1024
20
- | 4 ;
19
+ | FileSystemProviderCapabilities.PathCaseSensitive
20
+ | FileSystemProviderCapabilities.FileOpenReadWriteClose;
21
21
  debugService.onDidEndSession(({ session }) => {
22
22
  for (const [fd, memory] of this.fdMemory) {
23
23
  if (memory.session === session) {
@@ -33,8 +33,8 @@ class DebugMemoryFileSystemProvider {
33
33
  const { session, memoryReference, offset } = this.parseUri(resource);
34
34
  const disposable = ( new DisposableStore());
35
35
  disposable.add(session.onDidChangeState(() => {
36
- if (session.state === 3 || session.state === 0 ) {
37
- this.changeEmitter.fire([{ type: 2 , resource }]);
36
+ if (session.state === State.Running || session.state === State.Inactive) {
37
+ this.changeEmitter.fire([{ type: FileChangeType.DELETED, resource }]);
38
38
  }
39
39
  }));
40
40
  disposable.add(session.onDidInvalidateMemory(e => {
@@ -44,7 +44,7 @@ class DebugMemoryFileSystemProvider {
44
44
  if (offset && (e.body.offset >= offset.toOffset || e.body.offset + e.body.count < offset.fromOffset)) {
45
45
  return;
46
46
  }
47
- this.changeEmitter.fire([{ resource, type: 0 }]);
47
+ this.changeEmitter.fire([{ resource, type: FileChangeType.UPDATED }]);
48
48
  }));
49
49
  return disposable;
50
50
  }
@@ -122,16 +122,16 @@ class DebugMemoryFileSystemProvider {
122
122
  let readSoFar = 0;
123
123
  for (const range of ranges) {
124
124
  switch (range.type) {
125
- case 1 :
125
+ case MemoryRangeType.Unreadable:
126
126
  return readSoFar;
127
- case 2 :
127
+ case MemoryRangeType.Error:
128
128
  if (readSoFar > 0) {
129
129
  return readSoFar;
130
130
  }
131
131
  else {
132
132
  throw createFileSystemProviderError(range.error, FileSystemProviderErrorCode.Unknown);
133
133
  }
134
- case 0 : {
134
+ case MemoryRangeType.Valid: {
135
135
  const start = Math.max(0, pos - range.offset);
136
136
  const toWrite = range.data.slice(start, Math.min(range.data.byteLength, start + (length - readSoFar)));
137
137
  data.set(toWrite.buffer, offset + readSoFar);
@@ -1,6 +1,7 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Event } from 'vscode/vscode/vs/base/common/event';
3
3
  import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
4
+ import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
4
5
  import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
5
6
  import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
6
7
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
@@ -28,7 +29,7 @@ let DebugProgressContribution = class DebugProgressContribution {
28
29
  }
29
30
  const source = debugService.getAdapterManager().getDebuggerLabel(session.configuration.type);
30
31
  progressService.withProgress({
31
- location: 15 ,
32
+ location: ProgressLocation.Notification,
32
33
  title: progressStartEvent.body.title,
33
34
  cancellable: progressStartEvent.body.cancellable,
34
35
  source,
@@ -3,6 +3,7 @@ import { PickerQuickAccessProvider, TriggerAction } from 'vscode/vscode/vs/platf
3
3
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
4
4
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
5
5
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
6
+ import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
6
7
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
7
8
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
8
9
  import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
@@ -40,7 +41,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
40
41
  }
41
42
  picks.push({
42
43
  label: config.name,
43
- description: this.contextService.getWorkbenchState() === 3 ? config.launch.name : '',
44
+ description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? config.launch.name : '',
44
45
  highlights: { label: highlights },
45
46
  buttons: [{
46
47
  iconClass: ThemeIcon.asClassName(debugConfigure),
@@ -114,12 +115,12 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
114
115
  picks.push({ type: 'separator', label: ( localizeWithPath(_moduleId, 5, "configure")) });
115
116
  }
116
117
  for (const launch of visibleLaunches) {
117
- const label = this.contextService.getWorkbenchState() === 3 ?
118
+ const label = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ?
118
119
  ( localizeWithPath(_moduleId, 6, "Add Config ({0})...", launch.name)) :
119
120
  ( localizeWithPath(_moduleId, 7, "Add Configuration..."));
120
121
  picks.push({
121
122
  label,
122
- description: this.contextService.getWorkbenchState() === 3 ? launch.name : '',
123
+ description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? launch.name : '',
123
124
  highlights: { label: matchesFuzzy(filter, label, true) ?? undefined },
124
125
  accept: () => this.commandService.executeCommand(ADD_CONFIGURATION_ID, ( (launch.uri.toString())))
125
126
  });