@codingame/monaco-vscode-debug-service-override 9.0.2 → 10.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 (46) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +160 -0
  3. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +22 -22
  4. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +133 -136
  5. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +12 -17
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +12 -13
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +23 -26
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +1 -1
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +35 -36
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +21 -28
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +29 -42
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +10 -10
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +1 -2
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +11 -12
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +55 -67
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +58 -58
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +3 -6
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +5 -7
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +35 -42
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +1 -2
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +17 -21
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +8 -8
  23. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +13 -15
  24. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +8 -9
  25. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +3 -5
  26. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +12 -13
  27. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +5 -5
  29. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +66 -71
  30. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +12 -14
  31. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +4 -6
  32. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +2 -3
  33. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +40 -45
  34. package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +20 -22
  35. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +5 -6
  36. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +39 -48
  37. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +34 -35
  38. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +9 -10
  39. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +3 -3
  40. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -3
  41. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +44 -44
  42. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +24 -24
  43. package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +5 -4
  44. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +11 -11
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +2 -2
  46. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
@@ -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 { 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';
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';
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
- | FileSystemProviderCapabilities.PathCaseSensitive
20
- | FileSystemProviderCapabilities.FileOpenReadWriteClose;
19
+ | 1024
20
+ | 4 ;
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 === State.Running || session.state === State.Inactive) {
37
- this.changeEmitter.fire([{ type: FileChangeType.DELETED, resource }]);
36
+ if (session.state === 3 || session.state === 0 ) {
37
+ this.changeEmitter.fire([{ type: 2 , 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: FileChangeType.UPDATED }]);
47
+ this.changeEmitter.fire([{ resource, type: 0 }]);
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 MemoryRangeType.Unreadable:
125
+ case 1 :
126
126
  return readSoFar;
127
- case MemoryRangeType.Error:
127
+ case 2 :
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 MemoryRangeType.Valid: {
134
+ case 0 : {
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,7 +1,6 @@
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';
5
4
  import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
6
5
  import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
7
6
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
@@ -29,7 +28,7 @@ let DebugProgressContribution = class DebugProgressContribution {
29
28
  }
30
29
  const source = debugService.getAdapterManager().getDebuggerLabel(session.configuration.type);
31
30
  progressService.withProgress({
32
- location: ProgressLocation.Notification,
31
+ location: 15 ,
33
32
  title: progressStartEvent.body.title,
34
33
  cancellable: progressStartEvent.body.cancellable,
35
34
  source,
@@ -3,7 +3,6 @@ import { PickerQuickAccessProvider, TriggerAction } from 'vscode/vscode/vs/platf
3
3
  import { localize } 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';
7
6
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
8
7
  import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
9
8
  import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
@@ -15,7 +14,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
15
14
  constructor(debugService, contextService, commandService, notificationService) {
16
15
  super(DEBUG_QUICK_ACCESS_PREFIX, {
17
16
  noResultsPick: {
18
- label: ( localize(6008, "No matching launch configurations"))
17
+ label: ( localize(6033, "No matching launch configurations"))
19
18
  }
20
19
  });
21
20
  this.debugService = debugService;
@@ -40,11 +39,11 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
40
39
  }
41
40
  picks.push({
42
41
  label: config.name,
43
- description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? config.launch.name : '',
42
+ description: this.contextService.getWorkbenchState() === 3 ? config.launch.name : '',
44
43
  highlights: { label: highlights },
45
44
  buttons: [{
46
45
  iconClass: ThemeIcon.asClassName(debugConfigure),
47
- tooltip: ( localize(6009, "Configure Launch Configuration"))
46
+ tooltip: ( localize(6034, "Configure Launch Configuration"))
48
47
  }],
49
48
  trigger: () => {
50
49
  config.launch.openConfigFile({ preserveFocus: false });
@@ -65,7 +64,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
65
64
  const dynamicProviders = await configManager.getDynamicProviders();
66
65
  if (dynamicProviders.length > 0) {
67
66
  picks.push({
68
- type: 'separator', label: ( localize(6010, "contributed"))
67
+ type: 'separator', label: ( localize(6035, "contributed"))
69
68
  });
70
69
  }
71
70
  configManager.getRecentDynamicConfigurations().forEach(({ name, type }) => {
@@ -76,7 +75,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
76
75
  highlights: { label: highlights },
77
76
  buttons: [{
78
77
  iconClass: ThemeIcon.asClassName(debugRemoveConfig),
79
- tooltip: ( localize(6011, "Remove Launch Configuration"))
78
+ tooltip: ( localize(6036, "Remove Launch Configuration"))
80
79
  }],
81
80
  trigger: () => {
82
81
  configManager.removeRecentDynamicConfigurations(name, type);
@@ -99,7 +98,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
99
98
  dynamicProviders.forEach(provider => {
100
99
  picks.push({
101
100
  label: `$(folder) ${provider.label}...`,
102
- ariaLabel: ( localize(6012, "{0} contributed configurations", provider.label)),
101
+ ariaLabel: ( localize(6037, "{0} contributed configurations", provider.label)),
103
102
  accept: async () => {
104
103
  const pick = await provider.pick();
105
104
  if (pick) {
@@ -111,15 +110,15 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
111
110
  });
112
111
  const visibleLaunches = configManager.getLaunches().filter(launch => !launch.hidden);
113
112
  if (visibleLaunches.length > 0) {
114
- picks.push({ type: 'separator', label: ( localize(6013, "configure")) });
113
+ picks.push({ type: 'separator', label: ( localize(6038, "configure")) });
115
114
  }
116
115
  for (const launch of visibleLaunches) {
117
- const label = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ?
118
- ( localize(6014, "Add Config ({0})...", launch.name)) :
119
- ( localize(6015, "Add Configuration..."));
116
+ const label = this.contextService.getWorkbenchState() === 3 ?
117
+ ( localize(6039, "Add Config ({0})...", launch.name)) :
118
+ ( localize(6040, "Add Configuration..."));
120
119
  picks.push({
121
120
  label,
122
- description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? launch.name : '',
121
+ description: this.contextService.getWorkbenchState() === 3 ? launch.name : '',
123
122
  highlights: { label: matchesFuzzy(filter, label, true) ?? undefined },
124
123
  accept: () => this.commandService.executeCommand(ADD_CONFIGURATION_ID, ( (launch.uri.toString())))
125
124
  });
@@ -19,25 +19,21 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
19
19
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
20
20
  import { IExtensionHostDebugService } from 'vscode/vscode/vs/platform/debug/common/extensionHostDebug.service';
21
21
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
22
- import { FileChangeType } from 'vscode/vscode/vs/platform/files/common/files';
23
22
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
24
23
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
25
24
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
26
25
  import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
27
26
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
28
- import { WorkbenchState } from 'vscode/vscode/vs/platform/workspace/common/workspace';
29
27
  import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
30
28
  import { IWorkspaceTrustRequestService } from 'vscode/vscode/vs/platform/workspace/common/workspaceTrust.service';
31
- import { EditorsOrder } from 'vscode/vscode/vs/workbench/common/editor';
32
- import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
33
29
  import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
34
30
  import { AdapterManager } from './debugAdapterManager.js';
35
31
  import { DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
36
32
  import { ConfigurationManager } from './debugConfigurationManager.js';
37
33
  import { DebugMemoryFileSystemProvider } from './debugMemory.js';
38
34
  import { DebugSession } from './debugSession.js';
39
- import { DebugTaskRunner, TaskRunResult } from './debugTaskRunner.js';
40
- import { State, CALLSTACK_VIEW_ID, DEBUG_MEMORY_SCHEME, CONTEXT_DEBUG_TYPE, CONTEXT_DEBUG_STATE, CONTEXT_HAS_DEBUGGED, CONTEXT_IN_DEBUG_MODE, CONTEXT_DEBUG_UX, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_DISASSEMBLY_VIEW_FOCUS, getStateLabel, debuggerDisabledMessage, VIEWLET_ID, REPL_VIEW_ID, DEBUG_SCHEME } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
35
+ import { DebugTaskRunner } from './debugTaskRunner.js';
36
+ import { CALLSTACK_VIEW_ID, DEBUG_MEMORY_SCHEME, CONTEXT_DEBUG_TYPE, CONTEXT_DEBUG_STATE, CONTEXT_HAS_DEBUGGED, CONTEXT_IN_DEBUG_MODE, CONTEXT_DEBUG_UX, CONTEXT_BREAKPOINTS_EXIST, CONTEXT_DISASSEMBLY_VIEW_FOCUS, getStateLabel, debuggerDisabledMessage, VIEWLET_ID, REPL_VIEW_ID, DEBUG_SCHEME } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
41
37
  import { DebugCompoundRoot } from '../common/debugCompoundRoot.js';
42
38
  import { DebugModel, Breakpoint, FunctionBreakpoint, DataBreakpoint, InstructionBreakpoint } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
43
39
  import { Source } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugSource';
@@ -52,7 +48,6 @@ import { NumberBadge } from 'vscode/vscode/vs/workbench/services/activity/common
52
48
  import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
53
49
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
54
50
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
55
- import { Parts } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
56
51
  import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
57
52
  import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
58
53
  import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
@@ -128,7 +123,7 @@ let DebugService = class DebugService {
128
123
  }
129
124
  }));
130
125
  this.disposables.add(Event.any(this.adapterManager.onDidRegisterDebugger, this.configurationManager.onDidSelectConfiguration)(() => {
131
- const debugUxValue = (this.state !== State.Inactive || (this.configurationManager.getAllConfigurations().length > 0 && this.adapterManager.hasEnabledDebuggers())) ? 'default' : 'simple';
126
+ const debugUxValue = (this.state !== 0 || (this.configurationManager.getAllConfigurations().length > 0 && this.adapterManager.hasEnabledDebuggers())) ? 'default' : 'simple';
132
127
  this.debugUx.set(debugUxValue);
133
128
  this.debugStorage.storeDebugUxState(debugUxValue);
134
129
  }));
@@ -138,7 +133,7 @@ let DebugService = class DebugService {
138
133
  if (numberOfSessions > 0) {
139
134
  const viewContainer = this.viewDescriptorService.getViewContainerByViewId(CALLSTACK_VIEW_ID);
140
135
  if (viewContainer) {
141
- this.activity = this.activityService.showViewContainerActivity(viewContainer.id, { badge: ( (new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(2567, "1 active session")) : ( localize(2568, "{0} active sessions", n))))) });
136
+ this.activity = this.activityService.showViewContainerActivity(viewContainer.id, { badge: ( (new NumberBadge(numberOfSessions, n => n === 1 ? ( localize(2552, "1 active session")) : ( localize(2553, "{0} active sessions", n))))) });
142
137
  }
143
138
  }
144
139
  }));
@@ -160,7 +155,7 @@ let DebugService = class DebugService {
160
155
  }
161
156
  }));
162
157
  this.disposables.add(extensionService.onWillStop(evt => {
163
- evt.veto(this.model.getSessions().length > 0, ( localize(2569, 'A debug session is still running.')));
158
+ evt.veto(this.model.getSessions().length > 0, ( localize(2554, 'A debug session is still running.')));
164
159
  }));
165
160
  this.initContextKeys(contextKeyService);
166
161
  }
@@ -204,7 +199,7 @@ let DebugService = class DebugService {
204
199
  if (focusedSession) {
205
200
  return focusedSession.state;
206
201
  }
207
- return this.initializing ? State.Initializing : State.Inactive;
202
+ return this.initializing ? 1 : 0 ;
208
203
  }
209
204
  get initializingOptions() {
210
205
  return this._initializingOptions;
@@ -241,8 +236,8 @@ let DebugService = class DebugService {
241
236
  if (this.previousState !== state) {
242
237
  this.contextKeyService.bufferChangeEvents(() => {
243
238
  this.debugState.set(getStateLabel(state));
244
- this.inDebugMode.set(state !== State.Inactive);
245
- const debugUxValue = ((state !== State.Inactive && state !== State.Initializing) || (this.adapterManager.hasEnabledDebuggers() && this.configurationManager.selectedConfiguration.name)) ? 'default' : 'simple';
239
+ this.inDebugMode.set(state !== 0 );
240
+ const debugUxValue = (((state !== 0 && state !== 1) ) || (this.adapterManager.hasEnabledDebuggers() && this.configurationManager.selectedConfiguration.name)) ? 'default' : 'simple';
246
241
  this.debugUx.set(debugUxValue);
247
242
  this.debugStorage.storeDebugUxState(debugUxValue);
248
243
  });
@@ -269,8 +264,8 @@ let DebugService = class DebugService {
269
264
  }
270
265
  }
271
266
  async startDebugging(launch, configOrName, options, saveBeforeStart = !options?.parentSession) {
272
- const message = options && options.noDebug ? ( localize(2570, "Running executes build tasks and program code from your workspace.")) : ( localize(
273
- 2571,
267
+ const message = options && options.noDebug ? ( localize(2555, "Running executes build tasks and program code from your workspace.")) : ( localize(
268
+ 2556,
274
269
  "Debugging executes build tasks and program code from your workspace."
275
270
  ));
276
271
  const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({ message });
@@ -301,13 +296,13 @@ let DebugService = class DebugService {
301
296
  if (compound) {
302
297
  if (!compound.configurations) {
303
298
  throw ( (new Error(localize(
304
- 2572,
299
+ 2557,
305
300
  "Compound must have \"configurations\" attribute set in order to start multiple configurations."
306
301
  ))));
307
302
  }
308
303
  if (compound.preLaunchTask) {
309
304
  const taskResult = await this.taskRunner.runTaskAndCheckErrors(launch?.workspace || this.contextService.getWorkspace(), compound.preLaunchTask);
310
- if (taskResult === TaskRunResult.Failure) {
305
+ if (taskResult === 0 ) {
311
306
  this.endInitializingState();
312
307
  return false;
313
308
  }
@@ -331,9 +326,9 @@ let DebugService = class DebugService {
331
326
  }
332
327
  else {
333
328
  throw ( (new Error(
334
- launchesContainingName.length === 0 ? localize(2573, "Could not find launch configuration '{0}' in the workspace.", name)
329
+ launchesContainingName.length === 0 ? localize(2558, "Could not find launch configuration '{0}' in the workspace.", name)
335
330
  : localize(
336
- 2574,
331
+ 2559,
337
332
  "There are multiple launch configurations '{0}' in the workspace. Use folder name to qualify the configuration.",
338
333
  name
339
334
  )
@@ -347,7 +342,7 @@ let DebugService = class DebugService {
347
342
  }
348
343
  else {
349
344
  throw ( (new Error(localize(
350
- 2575,
345
+ 2560,
351
346
  "Can not find folder with name '{0}' for configuration '{1}' in compound '{2}'.",
352
347
  configData.folder,
353
348
  configData.name,
@@ -363,11 +358,11 @@ let DebugService = class DebugService {
363
358
  }
364
359
  if (configOrName && !config) {
365
360
  const message = !!launch ? ( localize(
366
- 2576,
361
+ 2561,
367
362
  "Configuration '{0}' is missing in 'launch.json'.",
368
363
  typeof configOrName === 'string' ? configOrName : configOrName.name
369
364
  )) :
370
- ( localize(2577, "'launch.json' does not exist for passed workspace folder."));
365
+ ( localize(2562, "'launch.json' does not exist for passed workspace folder."));
371
366
  throw ( (new Error(message)));
372
367
  }
373
368
  const result = await this.createSession(launch, config, options);
@@ -424,7 +419,7 @@ let DebugService = class DebugService {
424
419
  }
425
420
  const workspace = launch?.workspace || this.contextService.getWorkspace();
426
421
  const taskResult = await this.taskRunner.runTaskAndCheckErrors(workspace, resolvedConfig.preLaunchTask);
427
- if (taskResult === TaskRunResult.Failure) {
422
+ if (taskResult === 0 ) {
428
423
  return false;
429
424
  }
430
425
  const cfg = await this.configurationManager.resolveDebugConfigurationWithSubstitutedVariables(launch && launch.workspace ? launch.workspace.uri : undefined, resolvedConfig.type, resolvedConfig, initCancellationToken.token);
@@ -440,23 +435,23 @@ let DebugService = class DebugService {
440
435
  let message;
441
436
  if (configByProviders.request !== 'attach' && configByProviders.request !== 'launch') {
442
437
  message = configByProviders.request ? ( localize(
443
- 2578,
438
+ 2563,
444
439
  "Attribute '{0}' has an unsupported value '{1}' in the chosen debug configuration.",
445
440
  'request',
446
441
  configByProviders.request
447
442
  ))
448
443
  : ( localize(
449
- 2579,
444
+ 2564,
450
445
  "Attribute '{0}' is missing from the chosen debug configuration.",
451
446
  'request'
452
447
  ));
453
448
  }
454
449
  else {
455
- message = resolvedConfig.type ? ( localize(2580, "Configured debug type '{0}' is not supported.", resolvedConfig.type)) :
456
- ( localize(2581, "Missing property 'type' for the chosen launch configuration."));
450
+ message = resolvedConfig.type ? ( localize(2565, "Configured debug type '{0}' is not supported.", resolvedConfig.type)) :
451
+ ( localize(2566, "Missing property 'type' for the chosen launch configuration."));
457
452
  }
458
453
  const actionList = [];
459
- actionList.push(( (new Action('installAdditionalDebuggers', ( localize(2582, "Install {0} Extension", resolvedConfig.type)), undefined, true, async () => this.commandService.executeCommand('debug.installAdditionalDebuggers', resolvedConfig?.type)))));
454
+ actionList.push(( (new Action('installAdditionalDebuggers', ( localize(2567, "Install {0} Extension", resolvedConfig.type)), undefined, true, async () => this.commandService.executeCommand('debug.installAdditionalDebuggers', resolvedConfig?.type)))));
460
455
  await this.showError(message, actionList);
461
456
  return false;
462
457
  }
@@ -475,9 +470,9 @@ let DebugService = class DebugService {
475
470
  if (err && err.message) {
476
471
  await this.showError(err.message);
477
472
  }
478
- else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY) {
473
+ else if (this.contextService.getWorkbenchState() === 1 ) {
479
474
  await this.showError(( localize(
480
- 2583,
475
+ 2568,
481
476
  "The active file can not be debugged. Make sure it is saved and that you have a debug extension installed for that file type."
482
477
  )));
483
478
  }
@@ -496,7 +491,7 @@ let DebugService = class DebugService {
496
491
  const session = this.instantiationService.createInstance(DebugSession, sessionId, configuration, root, this.model, options);
497
492
  if (options?.startedByUser && ( (this.model.getSessions().some(s => s.getLabel() === session.getLabel()))) && configuration.resolved.suppressMultipleSessionWarning !== true) {
498
493
  const result = await this.dialogService.confirm({ message: ( localize(
499
- 2584,
494
+ 2569,
500
495
  "'{0}' is already running. Do you want to start another instance?",
501
496
  session.getLabel()
502
497
  )) });
@@ -508,7 +503,7 @@ let DebugService = class DebugService {
508
503
  this._onWillNewSession.fire(session);
509
504
  const openDebug = this.configurationService.getValue('debug').openDebug;
510
505
  if (!configuration.resolved.noDebug && (openDebug === 'openOnSessionStart' || (openDebug !== 'neverOpen' && this.viewModel.firstSessionStart)) && !session.suppressDebugView) {
511
- await this.paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar);
506
+ await this.paneCompositeService.openPaneComposite(VIEWLET_ID, 0 );
512
507
  }
513
508
  try {
514
509
  await this.launchOrAttachToSession(session);
@@ -566,12 +561,12 @@ let DebugService = class DebugService {
566
561
  const listenerDisposables = ( (new DisposableStore()));
567
562
  this.disposables.add(listenerDisposables);
568
563
  const sessionRunningScheduler = listenerDisposables.add(( (new RunOnceScheduler(() => {
569
- if (session.state === State.Running && this.viewModel.focusedSession === session) {
564
+ if (session.state === 3 && this.viewModel.focusedSession === session) {
570
565
  this.viewModel.setFocus(undefined, this.viewModel.focusedThread, session, false);
571
566
  }
572
567
  }, 200))));
573
568
  listenerDisposables.add(session.onDidChangeState(() => {
574
- if (session.state === State.Running && this.viewModel.focusedSession === session) {
569
+ if (session.state === 3 && this.viewModel.focusedSession === session) {
575
570
  sessionRunningScheduler.schedule();
576
571
  }
577
572
  if (session === this.viewModel.focusedSession) {
@@ -587,7 +582,7 @@ let DebugService = class DebugService {
587
582
  if (adapterExitEvent) {
588
583
  if (adapterExitEvent.error) {
589
584
  this.notificationService.error(( localize(
590
- 2585,
585
+ 2570,
591
586
  "Debug adapter process has terminated unexpectedly ({0})",
592
587
  adapterExitEvent.error.message || ( (adapterExitEvent.error.toString()))
593
588
  )));
@@ -595,7 +590,7 @@ let DebugService = class DebugService {
595
590
  this.telemetry.logDebugSessionStop(session, adapterExitEvent);
596
591
  }
597
592
  const extensionDebugSession = getExtensionHostDebugSession(session);
598
- if (extensionDebugSession && extensionDebugSession.state === State.Running && extensionDebugSession.configuration.noDebug) {
593
+ if (extensionDebugSession && extensionDebugSession.state === 3 && extensionDebugSession.configuration.noDebug) {
599
594
  this.extensionHostDebugService.close(extensionDebugSession.getId());
600
595
  }
601
596
  if (session.configuration.postDebugTask) {
@@ -610,7 +605,7 @@ let DebugService = class DebugService {
610
605
  this.endInitializingState();
611
606
  this.cancelTokens(session.getId());
612
607
  if (this.configurationService.getValue('debug').closeReadonlyTabsOnEnd) {
613
- const editorsToClose = this.editorService.getEditors(EditorsOrder.SEQUENTIAL).filter(({ editor }) => {
608
+ const editorsToClose = this.editorService.getEditors(1 ).filter(({ editor }) => {
614
609
  return editor.resource?.scheme === DEBUG_SCHEME && session.getId() === Source.getEncodedDebugData(editor.resource).sessionId;
615
610
  });
616
611
  this.editorService.closeEditors(editorsToClose);
@@ -623,8 +618,8 @@ let DebugService = class DebugService {
623
618
  }
624
619
  if (this.model.getSessions().length === 0) {
625
620
  this.viewModel.setMultiSessionView(false);
626
- if (this.layoutService.isVisible(Parts.SIDEBAR_PART) && this.configurationService.getValue('debug').openExplorerOnEnd) {
627
- this.paneCompositeService.openPaneComposite(VIEWLET_ID$1, ViewContainerLocation.Sidebar);
621
+ if (this.layoutService.isVisible("workbench.parts.sidebar" ) && this.configurationService.getValue('debug').openExplorerOnEnd) {
622
+ this.paneCompositeService.openPaneComposite(VIEWLET_ID$1, 0 );
628
623
  }
629
624
  const dataBreakpoints = this.model.getDataBreakpoints().filter(dbp => !dbp.canPersist);
630
625
  dataBreakpoints.forEach(dbp => this.model.removeDataBreakpoints(dbp.getId()));
@@ -645,13 +640,13 @@ let DebugService = class DebugService {
645
640
  const isAutoRestart = !!restartData;
646
641
  const runTasks = async () => {
647
642
  if (isAutoRestart) {
648
- return Promise.resolve(TaskRunResult.Success);
643
+ return Promise.resolve(1 );
649
644
  }
650
645
  const root = session.root || this.contextService.getWorkspace();
651
646
  await this.taskRunner.runTask(root, session.configuration.preRestartTask);
652
647
  await this.taskRunner.runTask(root, session.configuration.postDebugTask);
653
648
  const taskResult1 = await this.taskRunner.runTaskAndCheckErrors(root, session.configuration.preLaunchTask);
654
- if (taskResult1 !== TaskRunResult.Success) {
649
+ if (taskResult1 !== 1 ) {
655
650
  return taskResult1;
656
651
  }
657
652
  return this.taskRunner.runTaskAndCheckErrors(root, session.configuration.postRestartTask);
@@ -659,7 +654,7 @@ let DebugService = class DebugService {
659
654
  const extensionDebugSession = getExtensionHostDebugSession(session);
660
655
  if (extensionDebugSession) {
661
656
  const taskResult = await runTasks();
662
- if (taskResult === TaskRunResult.Success) {
657
+ if (taskResult === 1 ) {
663
658
  this.extensionHostDebugService.reload(extensionDebugSession.getId());
664
659
  }
665
660
  return;
@@ -720,7 +715,7 @@ let DebugService = class DebugService {
720
715
  }
721
716
  if (session.capabilities.supportsRestartRequest) {
722
717
  const taskResult = await runTasks();
723
- if (taskResult === TaskRunResult.Success) {
718
+ if (taskResult === 1 ) {
724
719
  await doRestart(async () => {
725
720
  await session.restart();
726
721
  return true;
@@ -740,7 +735,7 @@ let DebugService = class DebugService {
740
735
  (new Promise((c, e) => {
741
736
  setTimeout(async () => {
742
737
  const taskResult = await runTasks();
743
- if (taskResult !== TaskRunResult.Success) {
738
+ if (taskResult !== 1 ) {
744
739
  return c(false);
745
740
  }
746
741
  if (!resolved) {
@@ -830,7 +825,7 @@ let DebugService = class DebugService {
830
825
  if (lineNumber >= 1 && lineNumber <= model.getLineCount()) {
831
826
  const lineContent = control.getModel().getLineContent(lineNumber);
832
827
  alert(( localize(
833
- 2586,
828
+ 2571,
834
829
  "{0}, debugging paused {1}, {2}:{3}",
835
830
  lineContent,
836
831
  thread && thread.stoppedDetails ? `, reason ${thread.stoppedDetails.reason}` : '',
@@ -903,7 +898,7 @@ let DebugService = class DebugService {
903
898
  async addBreakpoints(uri, rawBreakpoints, ariaAnnounce = true) {
904
899
  const breakpoints = this.model.addBreakpoints(uri, rawBreakpoints);
905
900
  if (ariaAnnounce) {
906
- breakpoints.forEach(bp => status(( localize(2587, "Added breakpoint, line {0}, file {1}", bp.lineNumber, uri.fsPath))));
901
+ breakpoints.forEach(bp => status(( localize(2572, "Added breakpoint, line {0}, file {1}", bp.lineNumber, uri.fsPath))));
907
902
  }
908
903
  this.debugStorage.storeBreakpoints(this.model);
909
904
  await this.sendBreakpoints(uri);
@@ -925,7 +920,7 @@ let DebugService = class DebugService {
925
920
  const breakpoints = this.model.getBreakpoints();
926
921
  const toRemove = breakpoints.filter(bp => !id || bp.getId() === id);
927
922
  toRemove.forEach(bp => status(( localize(
928
- 2588,
923
+ 2573,
929
924
  "Removed breakpoint, line {0}, file {1}",
930
925
  bp.lineNumber,
931
926
  bp.uri.fsPath
@@ -1090,13 +1085,13 @@ let DebugService = class DebugService {
1090
1085
  });
1091
1086
  }
1092
1087
  onFileChanges(fileChangesEvent) {
1093
- const toRemove = this.model.getBreakpoints().filter(bp => fileChangesEvent.contains(bp.originalUri, FileChangeType.DELETED));
1088
+ const toRemove = this.model.getBreakpoints().filter(bp => fileChangesEvent.contains(bp.originalUri, 2 ));
1094
1089
  if (toRemove.length) {
1095
1090
  this.model.removeBreakpoints(toRemove);
1096
1091
  }
1097
1092
  const toSend = [];
1098
1093
  for (const uri of this.breakpointsToSendOnResourceSaved) {
1099
- if (fileChangesEvent.contains(uri, FileChangeType.UPDATED)) {
1094
+ if (fileChangesEvent.contains(uri, 0 )) {
1100
1095
  toSend.push(uri);
1101
1096
  }
1102
1097
  }
@@ -1122,7 +1117,7 @@ let DebugService = class DebugService {
1122
1117
  return { threadToContinue, breakpointToRemove };
1123
1118
  };
1124
1119
  const removeTempBreakPoint = (state) => {
1125
- if (state === State.Stopped || state === State.Inactive) {
1120
+ if (state === 2 || state === 0 ) {
1126
1121
  if (breakpointToRemove) {
1127
1122
  this.removeBreakpoints(breakpointToRemove.getId());
1128
1123
  }
@@ -1131,7 +1126,7 @@ let DebugService = class DebugService {
1131
1126
  return false;
1132
1127
  };
1133
1128
  await addTempBreakPoint();
1134
- if (this.state === State.Inactive) {
1129
+ if (this.state === 0 ) {
1135
1130
  const { launch, name, getConfig } = this.getConfigurationManager().selectedConfiguration;
1136
1131
  const config = await getConfig();
1137
1132
  const configOrName = config ? Object.assign(deepClone(config), {}) : name;
@@ -1142,7 +1137,7 @@ let DebugService = class DebugService {
1142
1137
  });
1143
1138
  await this.startDebugging(launch, configOrName, undefined, true);
1144
1139
  }
1145
- if (this.state === State.Stopped) {
1140
+ if (this.state === 2 ) {
1146
1141
  const focusedSession = this.getViewModel().focusedSession;
1147
1142
  if (!focusedSession || !threadToContinue) {
1148
1143
  return;
@@ -1174,40 +1169,33 @@ let DebugService = class DebugService {
1174
1169
  }))), 2000);
1175
1170
  listener.dispose();
1176
1171
  }
1177
- let Score;
1178
- ( ((function(Score) {
1179
- Score[Score["Focused"] = 0] = "Focused";
1180
- Score[Score["Verified"] = 1] = "Verified";
1181
- Score[Score["VerifiedAndPausedInFile"] = 2] = "VerifiedAndPausedInFile";
1182
- Score[Score["VerifiedAndFocused"] = 3] = "VerifiedAndFocused";
1183
- })(Score || (Score = {}))));
1184
1172
  let bestThread = viewModel.focusedThread;
1185
- let bestScore = Score.Focused;
1173
+ let bestScore = 0 ;
1186
1174
  for (const sessionId of breakpoint.sessionsThatVerified) {
1187
1175
  const session = debugModel.getSession(sessionId);
1188
1176
  if (!session) {
1189
1177
  continue;
1190
1178
  }
1191
1179
  const threads = session.getAllThreads().filter(t => t.stopped);
1192
- if (bestScore < Score.VerifiedAndFocused) {
1180
+ if (bestScore < 3 ) {
1193
1181
  if (viewModel.focusedThread && threads.includes(viewModel.focusedThread)) {
1194
1182
  bestThread = viewModel.focusedThread;
1195
- bestScore = Score.VerifiedAndFocused;
1183
+ bestScore = 3 ;
1196
1184
  }
1197
1185
  }
1198
- if (bestScore < Score.VerifiedAndPausedInFile) {
1186
+ if (bestScore < 2 ) {
1199
1187
  const pausedInThisFile = threads.find(t => {
1200
1188
  const top = t.getTopStackFrame();
1201
1189
  return top && this.uriIdentityService.extUri.isEqual(top.source.uri, uri);
1202
1190
  });
1203
1191
  if (pausedInThisFile) {
1204
1192
  bestThread = pausedInThisFile;
1205
- bestScore = Score.VerifiedAndPausedInFile;
1193
+ bestScore = 2 ;
1206
1194
  }
1207
1195
  }
1208
- if (bestScore < Score.Verified) {
1196
+ if (bestScore < 1 ) {
1209
1197
  bestThread = threads[0];
1210
- bestScore = Score.VerifiedAndPausedInFile;
1198
+ bestScore = 2 ;
1211
1199
  }
1212
1200
  }
1213
1201
  return { thread: bestThread, breakpoint };
@@ -1243,7 +1231,7 @@ function getStackFrameThreadAndSessionToFocus(model, stackFrame, thread, session
1243
1231
  }
1244
1232
  else {
1245
1233
  const sessions = model.getSessions();
1246
- const stoppedSession = sessions.find(s => s.state === State.Stopped);
1234
+ const stoppedSession = sessions.find(s => s.state === 2 );
1247
1235
  session = stoppedSession || sessions.find(s => s !== avoidSession && s !== avoidSession?.parentSession) || (sessions.length ? sessions[0] : undefined);
1248
1236
  }
1249
1237
  }