@codingame/monaco-vscode-debug-service-override 5.3.0 → 6.0.1

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
@@ -4,10 +4,12 @@ import Severity$1 from 'vscode/vscode/vs/base/common/severity';
4
4
  import { Markers } from 'vscode/vscode/vs/workbench/contrib/markers/common/markers';
5
5
  import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService.service';
6
6
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
7
+ import { TaskEventKind } from 'vscode/vscode/vs/workbench/contrib/tasks/common/tasks';
7
8
  import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
8
9
  import { MarkerSeverity } from 'vscode/vscode/vs/platform/markers/common/markers';
9
10
  import { IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers.service';
10
11
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
12
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
11
13
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
12
14
  import { createErrorWithActions } from 'vscode/vscode/vs/base/common/errorMessage';
13
15
  import { Action } from 'vscode/vscode/vs/base/common/actions';
@@ -26,6 +28,11 @@ function once(match, event) {
26
28
  return result;
27
29
  };
28
30
  }
31
+ var TaskRunResult;
32
+ ( ((function(TaskRunResult) {
33
+ TaskRunResult[TaskRunResult["Failure"] = 0] = "Failure";
34
+ TaskRunResult[TaskRunResult["Success"] = 1] = "Success";
35
+ })(TaskRunResult || (TaskRunResult = {}))));
29
36
  const DEBUG_TASK_ERROR_CHOICE_KEY = 'debug.taskerrorchoice';
30
37
  let DebugTaskRunner = class DebugTaskRunner {
31
38
  constructor(taskService, markerService, configurationService, viewsService, dialogService, storageService, commandService) {
@@ -46,21 +53,21 @@ let DebugTaskRunner = class DebugTaskRunner {
46
53
  this.canceled = false;
47
54
  const taskSummary = await this.runTask(root, taskId);
48
55
  if (this.canceled || (taskSummary && taskSummary.exitCode === undefined)) {
49
- return 0 ;
56
+ return TaskRunResult.Failure;
50
57
  }
51
58
  const errorCount = taskId ? this.markerService.read({ severities: MarkerSeverity.Error, take: 2 }).length : 0;
52
59
  const successExitCode = taskSummary && taskSummary.exitCode === 0;
53
60
  const failureExitCode = taskSummary && taskSummary.exitCode !== 0;
54
61
  const onTaskErrors = this.configurationService.getValue('debug').onTaskErrors;
55
62
  if (successExitCode || onTaskErrors === 'debugAnyway' || (errorCount === 0 && !failureExitCode)) {
56
- return 1 ;
63
+ return TaskRunResult.Success;
57
64
  }
58
65
  if (onTaskErrors === 'showErrors') {
59
66
  await this.viewsService.openView(Markers.MARKERS_VIEW_ID, true);
60
- return Promise.resolve(0 );
67
+ return Promise.resolve(TaskRunResult.Failure);
61
68
  }
62
69
  if (onTaskErrors === 'abort') {
63
- return Promise.resolve(0 );
70
+ return Promise.resolve(TaskRunResult.Failure);
64
71
  }
65
72
  const taskLabel = typeof taskId === 'string' ? taskId : taskId ? taskId.name : '';
66
73
  const message = errorCount > 1
@@ -109,17 +116,17 @@ let DebugTaskRunner = class DebugTaskRunner {
109
116
  this.configurationService.updateValue('debug.onTaskErrors', result === DebugChoice.DebugAnyway ? 'debugAnyway' : abort ? 'abort' : 'showErrors');
110
117
  }
111
118
  if (abort) {
112
- return Promise.resolve(0 );
119
+ return Promise.resolve(TaskRunResult.Failure);
113
120
  }
114
121
  if (debugAnyway) {
115
- return 1 ;
122
+ return TaskRunResult.Success;
116
123
  }
117
124
  await this.viewsService.openView(Markers.MARKERS_VIEW_ID, true);
118
- return Promise.resolve(0 );
125
+ return Promise.resolve(TaskRunResult.Failure);
119
126
  }
120
127
  catch (err) {
121
128
  const taskConfigureAction = this.taskService.configureAction();
122
- const choiceMap = JSON.parse(this.storageService.get(DEBUG_TASK_ERROR_CHOICE_KEY, 1 , '{}'));
129
+ const choiceMap = JSON.parse(this.storageService.get(DEBUG_TASK_ERROR_CHOICE_KEY, StorageScope.WORKSPACE, '{}'));
123
130
  let choice = -1;
124
131
  let DebugChoice;
125
132
  ( ((function(DebugChoice) {
@@ -154,13 +161,13 @@ let DebugTaskRunner = class DebugTaskRunner {
154
161
  choice = result;
155
162
  if (checkboxChecked) {
156
163
  choiceMap[err.message] = choice;
157
- this.storageService.store(DEBUG_TASK_ERROR_CHOICE_KEY, JSON.stringify(choiceMap), 1 , 1 );
164
+ this.storageService.store(DEBUG_TASK_ERROR_CHOICE_KEY, JSON.stringify(choiceMap), StorageScope.WORKSPACE, StorageTarget.MACHINE);
158
165
  }
159
166
  }
160
167
  if (choice === DebugChoice.ConfigureTask) {
161
168
  await taskConfigureAction.run();
162
169
  }
163
- return choice === DebugChoice.DebugAnyway ? 1 : 0 ;
170
+ return choice === DebugChoice.DebugAnyway ? TaskRunResult.Success : TaskRunResult.Failure;
164
171
  }
165
172
  }
166
173
  async runTask(root, taskId) {
@@ -192,12 +199,12 @@ let DebugTaskRunner = class DebugTaskRunner {
192
199
  const getTaskKey = (t) => t.getKey() ?? t.getMapKey();
193
200
  const taskKey = getTaskKey(task);
194
201
  const inactivePromise = ( (new Promise((c) => once(e => {
195
- return (e.kind === "inactive"
196
- || (e.kind === "processEnded" && e.exitCode === undefined))
202
+ return (e.kind === TaskEventKind.Inactive
203
+ || (e.kind === TaskEventKind.ProcessEnded && e.exitCode === undefined))
197
204
  && getTaskKey(e.__task) === taskKey;
198
205
  }, this.taskService.onDidStateChange)(e => {
199
206
  taskStarted = true;
200
- c(e.kind === "processEnded" ? { exitCode: e.exitCode } : null);
207
+ c(e.kind === TaskEventKind.ProcessEnded ? { exitCode: e.exitCode } : null);
201
208
  }))));
202
209
  const promise = this.taskService.getActiveTasks().then(async (tasks) => {
203
210
  if (tasks.find(t => getTaskKey(t) === taskKey)) {
@@ -208,7 +215,7 @@ let DebugTaskRunner = class DebugTaskRunner {
208
215
  }
209
216
  return Promise.resolve(null);
210
217
  }
211
- once(e => (((e.kind === "active") ) || ((e.kind === "dependsOnStarted") )) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
218
+ once(e => ((e.kind === TaskEventKind.Active) || (e.kind === TaskEventKind.DependsOnStarted)) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
212
219
  taskStarted = true;
213
220
  });
214
221
  const taskPromise = this.taskService.run(task);
@@ -220,7 +227,7 @@ let DebugTaskRunner = class DebugTaskRunner {
220
227
  return (
221
228
  (new Promise((c, e) => {
222
229
  const waitForInput = ( (new Promise(
223
- resolve => once(e => ((e.kind === "acquiredInput") ) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
230
+ resolve => once(e => (e.kind === TaskEventKind.AcquiredInput) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
224
231
  resolve();
225
232
  })
226
233
  )));
@@ -263,4 +270,4 @@ DebugTaskRunner = ( (__decorate([
263
270
  ( (__param(6, ICommandService)))
264
271
  ], DebugTaskRunner)));
265
272
 
266
- export { DebugTaskRunner };
273
+ export { DebugTaskRunner, TaskRunResult };
@@ -1,4 +1,5 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
+ import { State } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
2
3
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
3
4
  import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
4
5
  import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
@@ -8,7 +9,7 @@ let DebugTitleContribution = class DebugTitleContribution {
8
9
  constructor(debugService, hostService, titleService) {
9
10
  this.toDispose = [];
10
11
  const updateTitle = () => {
11
- if (debugService.state === 2 && !hostService.hasFocus) {
12
+ if (debugService.state === State.Stopped && !hostService.hasFocus) {
12
13
  titleService.updateProperties({ prefix: '🔴' });
13
14
  }
14
15
  else {
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { $, append, addDisposableGenericMouseUpListener, getWindow, addDisposableGenericMouseDownListener, addDisposableGenericMouseMoveListener, addDisposableListener, EventType, show, hide } from 'vscode/vscode/vs/base/browser/dom';
3
3
  import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
4
- import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
4
+ import { ActionBar, ActionsOrientation } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
5
5
  import { Action } from 'vscode/vscode/vs/base/common/actions';
6
6
  import { equals } from 'vscode/vscode/vs/base/common/arrays';
7
7
  import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
@@ -19,6 +19,7 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
19
19
  import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
20
20
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
21
21
  import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
22
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
22
23
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
23
24
  import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
24
25
  import 'vscode/vscode/vs/platform/theme/common/colorUtils';
@@ -39,8 +40,9 @@ import { FocusSessionActionViewItem } from './debugActionViewItems.js';
39
40
  import { debugToolBarBackground, debugToolBarBorder } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugColors';
40
41
  import { FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID, CONTINUE_ID, CONTINUE_LABEL, PAUSE_ID, PAUSE_LABEL, STOP_LABEL, DISCONNECT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_ID, STEP_INTO_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STEP_BACK_ID, REVERSE_CONTINUE_ID, FOCUS_SESSION_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
41
42
  import { debugGripper, debugContinue, debugPause, debugStop, debugDisconnect, debugStepOver, debugStepInto, debugStepOut, debugRestart, debugStepBack, debugReverseContinue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
42
- import { VIEWLET_ID, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_MULTI_SESSION_DEBUG, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
43
+ import { State, VIEWLET_ID, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_MULTI_SESSION_DEBUG, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
43
44
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
45
+ import { LayoutSettings, Parts, EditorTabsMode } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
44
46
  import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
45
47
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
46
48
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
@@ -73,7 +75,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
73
75
  this._register(this.debugToolBarMenu);
74
76
  this.activeActions = [];
75
77
  this.actionBar = this._register(( (new ActionBar(actionBarContainer, {
76
- orientation: 0 ,
78
+ orientation: ActionsOrientation.HORIZONTAL,
77
79
  actionViewItemProvider: (action, options) => {
78
80
  if (action.id === FOCUS_SESSION_ID) {
79
81
  return this.instantiationService.createInstance(FocusSessionActionViewItem, action, undefined);
@@ -91,10 +93,10 @@ let DebugToolBar = class DebugToolBar extends Themable {
91
93
  this.updateScheduler = this._register(( (new RunOnceScheduler(() => {
92
94
  const state = this.debugService.state;
93
95
  const toolBarLocation = this.configurationService.getValue('debug').toolBarLocation;
94
- if (state === 0 ||
96
+ if (state === State.Inactive ||
95
97
  toolBarLocation !== 'floating' ||
96
98
  this.debugService.getModel().getSessions().every(s => s.suppressDebugToolbar) ||
97
- (state === 1 && this.debugService.initializingOptions?.suppressDebugToolbar)) {
99
+ (state === State.Initializing && this.debugService.initializingOptions?.suppressDebugToolbar)) {
98
100
  return this.hide();
99
101
  }
100
102
  const actions = [];
@@ -116,7 +118,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
116
118
  if (e.affectsConfiguration('debug.toolBarLocation')) {
117
119
  this.updateScheduler.schedule();
118
120
  }
119
- if (e.affectsConfiguration("workbench.editor.showTabs" ) || e.affectsConfiguration("window.commandCenter" )) {
121
+ if (e.affectsConfiguration(LayoutSettings.EDITOR_TABS_MODE) || e.affectsConfiguration(LayoutSettings.COMMAND_CENTER)) {
120
122
  this._yRange = undefined;
121
123
  this.setCoordinates();
122
124
  }
@@ -175,8 +177,8 @@ let DebugToolBar = class DebugToolBar extends Themable {
175
177
  const y = rect.top;
176
178
  const x = rect.left / activeWindow.innerWidth;
177
179
  if (isMainWindow) {
178
- this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, x, 0 , 1 );
179
- this.storageService.store(DEBUG_TOOLBAR_Y_KEY, y, 0 , 1 );
180
+ this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, x, StorageScope.PROFILE, StorageTarget.MACHINE);
181
+ this.storageService.store(DEBUG_TOOLBAR_Y_KEY, y, StorageScope.PROFILE, StorageTarget.MACHINE);
180
182
  }
181
183
  else {
182
184
  this.auxWindowCoordinates.set(activeWindow, { x, y });
@@ -208,7 +210,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
208
210
  const isMainWindow = currentWindow === mainWindow;
209
211
  if (x === undefined) {
210
212
  const positionPercentage = isMainWindow
211
- ? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, 0 ))
213
+ ? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, StorageScope.PROFILE))
212
214
  : this.auxWindowCoordinates.get(currentWindow)?.x;
213
215
  x = positionPercentage !== undefined && !isNaN(positionPercentage)
214
216
  ? positionPercentage * currentWindow.innerWidth
@@ -218,7 +220,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
218
220
  this.$el.style.left = `${x}px`;
219
221
  if (y === undefined) {
220
222
  y = isMainWindow
221
- ? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, 0 )
223
+ ? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, StorageScope.PROFILE)
222
224
  : this.auxWindowCoordinates.get(currentWindow)?.y;
223
225
  }
224
226
  this.setYCoordinate(y ?? this.yDefault);
@@ -233,18 +235,18 @@ let DebugToolBar = class DebugToolBar extends Themable {
233
235
  }
234
236
  get yRange() {
235
237
  if (!this._yRange) {
236
- const isTitleBarVisible = this.layoutService.isVisible("workbench.parts.titlebar" , getWindow(this.layoutService.activeContainer));
238
+ const isTitleBarVisible = this.layoutService.isVisible(Parts.TITLEBAR_PART, getWindow(this.layoutService.activeContainer));
237
239
  const yMin = isTitleBarVisible ? 0 : this.layoutService.mainContainerOffset.top;
238
240
  let yMax = 0;
239
241
  if (isTitleBarVisible) {
240
- if (this.configurationService.getValue("window.commandCenter" ) === true) {
242
+ if (this.configurationService.getValue(LayoutSettings.COMMAND_CENTER) === true) {
241
243
  yMax += 35;
242
244
  }
243
245
  else {
244
246
  yMax += 28;
245
247
  }
246
248
  }
247
- if (this.configurationService.getValue("workbench.editor.showTabs" ) !== "none" ) {
249
+ if (this.configurationService.getValue(LayoutSettings.EDITOR_TABS_MODE) !== EditorTabsMode.NONE) {
248
250
  yMax += 35;
249
251
  }
250
252
  this._yRange = [yMin, yMax];
@@ -24,7 +24,7 @@ import { DEBUG_START_COMMAND_ID, FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID, DEBUG
24
24
  import { debugConfigure } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
25
25
  import { createDisconnectMenuItemAction } from './debugToolBar.js';
26
26
  import { WelcomeView } from './welcomeView.js';
27
- import { VIEWLET_ID, CONTEXT_DEBUG_UX_KEY, BREAKPOINTS_VIEW_ID, CONTEXT_DEBUG_UX, CONTEXT_DEBUG_STATE, getStateLabel, CONTEXT_DEBUGGERS_AVAILABLE, REPL_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
27
+ import { VIEWLET_ID, CONTEXT_DEBUG_UX_KEY, State, BREAKPOINTS_VIEW_ID, CONTEXT_DEBUG_UX, CONTEXT_DEBUG_STATE, getStateLabel, CONTEXT_DEBUGGERS_AVAILABLE, REPL_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
28
28
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
29
29
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
30
30
  import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
@@ -101,7 +101,7 @@ let DebugViewPaneContainer = class DebugViewPaneContainer extends ViewPaneContai
101
101
  this.progressResolve();
102
102
  this.progressResolve = undefined;
103
103
  }
104
- if (state === 1 ) {
104
+ if (state === State.Initializing) {
105
105
  this.progressService.withProgress({ location: VIEWLET_ID, }, _progress => {
106
106
  return (
107
107
  (new Promise(resolve => this.progressResolve = resolve))
@@ -168,7 +168,7 @@ MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
168
168
  order: 10,
169
169
  group: 'navigation',
170
170
  command: {
171
- precondition: ( (CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 )))),
171
+ precondition: ( (CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(State.Initializing)))),
172
172
  id: DEBUG_START_COMMAND_ID,
173
173
  title: DEBUG_START_LABEL
174
174
  }
@@ -5,6 +5,7 @@ import { binarySearch2 } from 'vscode/vscode/vs/base/common/arrays';
5
5
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
6
6
  import { dispose, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
7
7
  import { isAbsolute } from 'vscode/vscode/vs/base/common/path';
8
+ import { Constants } from 'vscode/vscode/vs/base/common/uint';
8
9
  import { URI } from 'vscode/vscode/vs/base/common/uri';
9
10
  import { applyFontInfo } from 'vscode/vscode/vs/editor/browser/config/domFontInfo';
10
11
  import { isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
@@ -15,6 +16,7 @@ import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resol
15
16
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
16
17
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
17
18
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
19
+ import { TextEditorSelectionRevealType } from 'vscode/vscode/vs/platform/editor/common/editor';
18
20
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
19
21
  import { WorkbenchTable } from 'vscode/vscode/vs/platform/list/browser/listService';
20
22
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
@@ -36,7 +38,7 @@ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/commo
36
38
  import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
37
39
  import { topStackFrameColor, focusedStackFrameColor } from 'vscode/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution';
38
40
  import { breakpoint, debugBreakpointHint, debugStackframe, debugStackframeFocused } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
39
- import { DISASSEMBLY_VIEW_ID, CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
41
+ import { DISASSEMBLY_VIEW_ID, State, CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
40
42
  import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
41
43
  import { InstructionBreakpoint } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
42
44
  import { getUriFromSource } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugSource';
@@ -261,8 +263,8 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
261
263
  }
262
264
  }));
263
265
  this._register(this._debugService.onDidChangeState(e => {
264
- if (((e === 3 || e === 2) ) &&
265
- ((this._previousDebuggingState !== 3 && this._previousDebuggingState !== 2) )) {
266
+ if ((e === State.Running || e === State.Stopped) &&
267
+ (this._previousDebuggingState !== State.Running && this._previousDebuggingState !== State.Stopped)) {
266
268
  this.clear();
267
269
  this._enableSourceCodeRender = this._configurationService.getValue('debug').disassemblyView.showSourceCode;
268
270
  }
@@ -695,12 +697,12 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
695
697
  startLineNumber: instruction.line,
696
698
  endLineNumber: instruction.endLine,
697
699
  startColumn: instruction.column || 1,
698
- endColumn: instruction.endColumn || 1073741824 ,
700
+ endColumn: instruction.endColumn || Constants.MAX_SAFE_SMALL_INTEGER,
699
701
  } : {
700
702
  startLineNumber: instruction.line,
701
703
  endLineNumber: instruction.line,
702
704
  startColumn: instruction.column || 1,
703
- endColumn: instruction.endColumn || 1073741824 ,
705
+ endColumn: instruction.endColumn || Constants.MAX_SAFE_SMALL_INTEGER,
704
706
  };
705
707
  this.editorService.openEditor({
706
708
  resource: sourceURI,
@@ -709,7 +711,7 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
709
711
  preserveFocus: false,
710
712
  selection: selection,
711
713
  revealIfOpened: true,
712
- selectionRevealType: 1 ,
714
+ selectionRevealType: TextEditorSelectionRevealType.CenterIfOutsideViewport,
713
715
  pinned: false,
714
716
  }
715
717
  });
@@ -20,6 +20,7 @@ import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
20
20
  import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
21
21
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
22
22
  import { LinkDetector } from './linkDetector.js';
23
+ import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
23
24
  import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
24
25
  import { Action } from 'vscode/vscode/vs/base/common/actions';
25
26
  import { widgetClose } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
@@ -57,7 +58,7 @@ let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
57
58
  }
58
59
  _fillContainer(container) {
59
60
  this.setCssClass('exception-widget');
60
- const fontInfo = this.editor.getOption(50 );
61
+ const fontInfo = this.editor.getOption(EditorOption.fontInfo);
61
62
  container.style.fontSize = `${fontInfo.fontSize}px`;
62
63
  container.style.lineHeight = `${fontInfo.lineHeight}px`;
63
64
  container.tabIndex = 0;
@@ -92,7 +93,7 @@ let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
92
93
  }
93
94
  _doLayout(_heightInPixel, _widthInPixel) {
94
95
  this.container.style.height = 'initial';
95
- const lineHeight = this.editor.getOption(67 );
96
+ const lineHeight = this.editor.getOption(EditorOption.lineHeight);
96
97
  const arrowHeight = Math.round(lineHeight / 3);
97
98
  const computedLinesNumber = Math.ceil((this.container.offsetHeight + arrowHeight) / lineHeight);
98
99
  this._relayout(computedLinesNumber);
@@ -4,7 +4,9 @@ import { URI } from 'vscode/vscode/vs/base/common/uri';
4
4
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
5
5
  import { ExtensionHostDebugChannelClient, ExtensionHostDebugBroadcastChannel } from '../../../../platform/debug/common/extensionHostDebugIpc.js';
6
6
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
7
+ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
7
8
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
9
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
8
10
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
9
11
  import { isFolderToOpen, isWorkspaceToOpen } from 'vscode/vscode/vs/platform/window/common/window';
10
12
  import { toWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier, isWorkspaceIdentifier, hasWorkspaceFileExtension } from 'vscode/vscode/vs/platform/workspace/common/workspace';
@@ -50,10 +52,10 @@ let BrowserExtensionHostDebugService = class BrowserExtensionHostDebugService ex
50
52
  const workspaceId = toWorkspaceIdentifier(contextService.getWorkspace());
51
53
  if (isSingleFolderWorkspaceIdentifier(workspaceId) || isWorkspaceIdentifier(workspaceId)) {
52
54
  const serializedWorkspace = isSingleFolderWorkspaceIdentifier(workspaceId) ? { folderUri: workspaceId.uri.toJSON() } : { workspaceUri: workspaceId.configPath.toJSON() };
53
- storageService.store(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, JSON.stringify(serializedWorkspace), 0 , 1 );
55
+ storageService.store(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, JSON.stringify(serializedWorkspace), StorageScope.PROFILE, StorageTarget.MACHINE);
54
56
  }
55
57
  else {
56
- storageService.remove(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, 0 );
58
+ storageService.remove(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, StorageScope.PROFILE);
57
59
  }
58
60
  }
59
61
  }
@@ -90,7 +92,7 @@ let BrowserExtensionHostDebugService = class BrowserExtensionHostDebugService ex
90
92
  }
91
93
  const extensionTestsPath = this.findArgument('extensionTestsPath', args);
92
94
  if (!debugWorkspace && !extensionTestsPath) {
93
- const lastExtensionDevelopmentWorkspace = this.storageService.get(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, 0 );
95
+ const lastExtensionDevelopmentWorkspace = this.storageService.get(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, StorageScope.PROFILE);
94
96
  if (lastExtensionDevelopmentWorkspace) {
95
97
  try {
96
98
  const serializedWorkspace = JSON.parse(lastExtensionDevelopmentWorkspace);
@@ -9,6 +9,7 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
9
9
  import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
10
10
  import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService.service';
11
11
  import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
12
+ import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
12
13
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
13
14
  import { ITunnelService } from 'vscode/vscode/vs/platform/tunnel/common/tunnel.service';
14
15
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
@@ -175,10 +176,10 @@ let LinkDetector = class LinkDetector {
175
176
  };
176
177
  link.onkeydown = e => {
177
178
  const event = ( (new StandardKeyboardEvent(e)));
178
- if (event.keyCode === 3 || event.keyCode === 10 ) {
179
+ if (event.keyCode === KeyCode.Enter || event.keyCode === KeyCode.Space) {
179
180
  event.preventDefault();
180
181
  event.stopPropagation();
181
- onClick(event.keyCode === 10 );
182
+ onClick(event.keyCode === KeyCode.Space);
182
183
  }
183
184
  };
184
185
  }
@@ -19,6 +19,7 @@ import { ltrim } from 'vscode/vscode/vs/base/common/strings';
19
19
  import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
20
20
  import { ResourceLabels } from 'vscode/vscode/vs/workbench/browser/labels';
21
21
  import { FileKind } from 'vscode/vscode/vs/platform/files/common/files';
22
+ import { TreeVisibility } from 'vscode/vscode/vs/base/browser/ui/tree/tree';
22
23
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
23
24
  import { WorkbenchCompressibleObjectTree } from 'vscode/vscode/vs/platform/list/browser/listService';
24
25
  import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
@@ -609,16 +610,16 @@ class LoadedScriptsFilter {
609
610
  }
610
611
  filter(element, parentVisibility) {
611
612
  if (!this.filterText) {
612
- return 1 ;
613
+ return TreeVisibility.Visible;
613
614
  }
614
615
  if (element.isLeaf()) {
615
616
  const name = element.getLabel();
616
617
  if (name.indexOf(this.filterText) >= 0) {
617
- return 1 ;
618
+ return TreeVisibility.Visible;
618
619
  }
619
- return 0 ;
620
+ return TreeVisibility.Hidden;
620
621
  }
621
- return 2 ;
622
+ return TreeVisibility.Recurse;
622
623
  }
623
624
  }
624
625
  registerAction2(class Collapse extends ViewAction {