@codingame/monaco-vscode-debug-service-override 25.1.2 → 26.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 (43) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +41 -29
  3. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +379 -255
  4. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +606 -325
  5. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +132 -91
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +105 -103
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +258 -147
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +14 -10
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +163 -121
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +92 -41
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +13 -12
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +68 -39
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +290 -214
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +409 -260
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +14 -12
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +19 -21
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +126 -100
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +8 -9
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +160 -89
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +87 -71
  21. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +270 -181
  22. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +79 -48
  23. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +149 -113
  24. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css +24 -3
  25. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +201 -189
  26. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +28 -35
  27. package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +10 -12
  28. package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +66 -86
  29. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +24 -31
  30. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +177 -138
  31. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +55 -33
  32. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -4
  33. package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +8 -12
  34. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +23 -19
  35. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +9 -15
  36. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +156 -133
  37. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +81 -52
  38. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +3 -5
  39. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +22 -14
  40. package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +46 -30
  41. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +74 -52
  42. package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +11 -10
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +7 -7
@@ -18,26 +18,45 @@ import { IRemoteAgentService } from '@codingame/monaco-vscode-api/vscode/vs/work
18
18
 
19
19
  var BrowserExtensionHostDebugService_1;
20
20
  let BrowserExtensionHostDebugService = class BrowserExtensionHostDebugService extends ExtensionHostDebugChannelClient {
21
- static { BrowserExtensionHostDebugService_1 = this; }
22
- static { this.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY = 'debug.lastExtensionDevelopmentWorkspace'; }
23
- constructor(remoteAgentService, environmentService, logService, hostService, contextService, storageService, fileService) {
21
+ static {
22
+ BrowserExtensionHostDebugService_1 = this;
23
+ }
24
+ static {
25
+ this.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY = "debug.lastExtensionDevelopmentWorkspace";
26
+ }
27
+ constructor(
28
+ remoteAgentService,
29
+ environmentService,
30
+ logService,
31
+ hostService,
32
+ contextService,
33
+ storageService,
34
+ fileService
35
+ ) {
24
36
  const connection = remoteAgentService.getConnection();
25
37
  let channel;
26
38
  if (connection) {
27
39
  channel = connection.getChannel(ExtensionHostDebugBroadcastChannel.ChannelName);
28
- }
29
- else {
30
- channel = { call: async () => Promise.resolve(undefined), listen: () => Event.None };
40
+ } else {
41
+ channel = {
42
+ call: async () => Promise.resolve(undefined),
43
+ listen: () => Event.None
44
+ };
31
45
  }
32
46
  super(channel);
33
47
  this.storageService = storageService;
34
48
  this.fileService = fileService;
35
49
  if (environmentService.options && environmentService.options.workspaceProvider) {
36
50
  this.workspaceProvider = environmentService.options.workspaceProvider;
37
- }
38
- else {
39
- this.workspaceProvider = { open: async () => true, workspace: undefined, trusted: undefined };
40
- logService.warn('Extension Host Debugging not available due to missing workspace provider.');
51
+ } else {
52
+ this.workspaceProvider = {
53
+ open: async () => true,
54
+ workspace: undefined,
55
+ trusted: undefined
56
+ };
57
+ logService.warn(
58
+ "Extension Host Debugging not available due to missing workspace provider."
59
+ );
41
60
  }
42
61
  this._register(this.onReload(event => {
43
62
  if (environmentService.isExtensionDevelopment && environmentService.debugExtensionHost.debugId === event.sessionId) {
@@ -52,27 +71,38 @@ let BrowserExtensionHostDebugService = class BrowserExtensionHostDebugService ex
52
71
  if (environmentService.isExtensionDevelopment && !environmentService.extensionTestsLocationURI) {
53
72
  const workspaceId = toWorkspaceIdentifier(contextService.getWorkspace());
54
73
  if (isSingleFolderWorkspaceIdentifier(workspaceId) || isWorkspaceIdentifier(workspaceId)) {
55
- const serializedWorkspace = isSingleFolderWorkspaceIdentifier(workspaceId) ? { folderUri: workspaceId.uri.toJSON() } : { workspaceUri: workspaceId.configPath.toJSON() };
56
- storageService.store(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, JSON.stringify(serializedWorkspace), StorageScope.PROFILE, StorageTarget.MACHINE);
57
- }
58
- else {
59
- storageService.remove(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, StorageScope.PROFILE);
74
+ const serializedWorkspace = isSingleFolderWorkspaceIdentifier(workspaceId) ? {
75
+ folderUri: workspaceId.uri.toJSON()
76
+ } : {
77
+ workspaceUri: workspaceId.configPath.toJSON()
78
+ };
79
+ storageService.store(
80
+ BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY,
81
+ JSON.stringify(serializedWorkspace),
82
+ StorageScope.PROFILE,
83
+ StorageTarget.MACHINE
84
+ );
85
+ } else {
86
+ storageService.remove(
87
+ BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY,
88
+ StorageScope.PROFILE
89
+ );
60
90
  }
61
91
  }
62
92
  }
63
93
  async openExtensionDevelopmentHostWindow(args, _debugRenderer) {
64
94
  const environment = ( new Map());
65
- const fileUriArg = this.findArgument('file-uri', args);
95
+ const fileUriArg = this.findArgument("file-uri", args);
66
96
  if (fileUriArg && !hasWorkspaceFileExtension(fileUriArg)) {
67
- environment.set('openFile', fileUriArg);
97
+ environment.set("openFile", fileUriArg);
68
98
  }
69
99
  const copyArgs = [
70
- 'extensionDevelopmentPath',
71
- 'extensionTestsPath',
72
- 'extensionEnvironment',
73
- 'debugId',
74
- 'inspect-brk-extensions',
75
- 'inspect-extensions',
100
+ "extensionDevelopmentPath",
101
+ "extensionTestsPath",
102
+ "extensionEnvironment",
103
+ "debugId",
104
+ "inspect-brk-extensions",
105
+ "inspect-extensions"
76
106
  ];
77
107
  for (const argName of copyArgs) {
78
108
  const value = this.findArgument(argName, args);
@@ -81,31 +111,38 @@ let BrowserExtensionHostDebugService = class BrowserExtensionHostDebugService ex
81
111
  }
82
112
  }
83
113
  let debugWorkspace = undefined;
84
- const folderUriArg = this.findArgument('folder-uri', args);
114
+ const folderUriArg = this.findArgument("folder-uri", args);
85
115
  if (folderUriArg) {
86
- debugWorkspace = { folderUri: ( URI.parse(folderUriArg)) };
87
- }
88
- else {
89
- const fileUriArg = this.findArgument('file-uri', args);
116
+ debugWorkspace = {
117
+ folderUri: ( URI.parse(folderUriArg))
118
+ };
119
+ } else {
120
+ const fileUriArg = this.findArgument("file-uri", args);
90
121
  if (fileUriArg && hasWorkspaceFileExtension(fileUriArg)) {
91
- debugWorkspace = { workspaceUri: ( URI.parse(fileUriArg)) };
122
+ debugWorkspace = {
123
+ workspaceUri: ( URI.parse(fileUriArg))
124
+ };
92
125
  }
93
126
  }
94
- const extensionTestsPath = this.findArgument('extensionTestsPath', args);
127
+ const extensionTestsPath = this.findArgument("extensionTestsPath", args);
95
128
  if (!debugWorkspace && !extensionTestsPath) {
96
- const lastExtensionDevelopmentWorkspace = this.storageService.get(BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY, StorageScope.PROFILE);
129
+ const lastExtensionDevelopmentWorkspace = this.storageService.get(
130
+ BrowserExtensionHostDebugService_1.LAST_EXTENSION_DEVELOPMENT_WORKSPACE_KEY,
131
+ StorageScope.PROFILE
132
+ );
97
133
  if (lastExtensionDevelopmentWorkspace) {
98
134
  try {
99
135
  const serializedWorkspace = JSON.parse(lastExtensionDevelopmentWorkspace);
100
136
  if (serializedWorkspace.workspaceUri) {
101
- debugWorkspace = { workspaceUri: URI.revive(serializedWorkspace.workspaceUri) };
102
- }
103
- else if (serializedWorkspace.folderUri) {
104
- debugWorkspace = { folderUri: URI.revive(serializedWorkspace.folderUri) };
137
+ debugWorkspace = {
138
+ workspaceUri: URI.revive(serializedWorkspace.workspaceUri)
139
+ };
140
+ } else if (serializedWorkspace.folderUri) {
141
+ debugWorkspace = {
142
+ folderUri: URI.revive(serializedWorkspace.folderUri)
143
+ };
105
144
  }
106
- }
107
- catch (error) {
108
- }
145
+ } catch (error) {}
109
146
  }
110
147
  }
111
148
  if (debugWorkspace) {
@@ -121,7 +158,9 @@ let BrowserExtensionHostDebugService = class BrowserExtensionHostDebugService ex
121
158
  reuse: false,
122
159
  payload: Array.from(environment.entries())
123
160
  });
124
- return { success };
161
+ return {
162
+ success
163
+ };
125
164
  }
126
165
  findArgument(key, args) {
127
166
  for (const a of args) {
@@ -133,14 +172,6 @@ let BrowserExtensionHostDebugService = class BrowserExtensionHostDebugService ex
133
172
  return undefined;
134
173
  }
135
174
  };
136
- BrowserExtensionHostDebugService = BrowserExtensionHostDebugService_1 = ( __decorate([
137
- ( __param(0, IRemoteAgentService)),
138
- ( __param(1, IBrowserWorkbenchEnvironmentService)),
139
- ( __param(2, ILogService)),
140
- ( __param(3, IHostService)),
141
- ( __param(4, IWorkspaceContextService)),
142
- ( __param(5, IStorageService)),
143
- ( __param(6, IFileService))
144
- ], BrowserExtensionHostDebugService));
175
+ BrowserExtensionHostDebugService = BrowserExtensionHostDebugService_1 = ( __decorate([( __param(0, IRemoteAgentService)), ( __param(1, IBrowserWorkbenchEnvironmentService)), ( __param(2, ILogService)), ( __param(3, IHostService)), ( __param(4, IWorkspaceContextService)), ( __param(5, IStorageService)), ( __param(6, IFileService))], BrowserExtensionHostDebugService));
145
176
 
146
177
  export { BrowserExtensionHostDebugService };
@@ -95,7 +95,7 @@ class BaseTreeItem {
95
95
  }
96
96
  }
97
97
  getTemplateId() {
98
- return 'id';
98
+ return "id";
99
99
  }
100
100
  getId() {
101
101
  const parent = this.getParent();
@@ -143,7 +143,7 @@ class BaseTreeItem {
143
143
  getLabel(separateRootFolder = true) {
144
144
  const child = this.oneChild();
145
145
  if (child) {
146
- const sep = (this instanceof RootFolderTreeItem && separateRootFolder) ? '' : posix.sep;
146
+ const sep = (this instanceof RootFolderTreeItem && separateRootFolder) ? "" : posix.sep;
147
147
  return `${this._label}${sep}${child.getLabel()}`;
148
148
  }
149
149
  return this._label;
@@ -200,7 +200,7 @@ class RootFolderTreeItem extends BaseTreeItem {
200
200
  }
201
201
  class RootTreeItem extends BaseTreeItem {
202
202
  constructor(_pathService, _contextService, _labelService) {
203
- super(undefined, 'Root');
203
+ super(undefined, "Root");
204
204
  this._pathService = _pathService;
205
205
  this._contextService = _contextService;
206
206
  this._labelService = _labelService;
@@ -213,7 +213,9 @@ class RootTreeItem extends BaseTreeItem {
213
213
  }
214
214
  }
215
215
  class SessionTreeItem extends BaseTreeItem {
216
- static { this.URL_REGEXP = /^(https?:\/\/[^/]+)(\/.*)$/; }
216
+ static {
217
+ this.URL_REGEXP = /^(https?:\/\/[^/]+)(\/.*)$/;
218
+ }
217
219
  constructor(labelService, parent, session, _pathService, rootProvider) {
218
220
  super(parent, session.getLabel(), true);
219
221
  this._pathService = _pathService;
@@ -266,8 +268,7 @@ class SessionTreeItem extends BaseTreeItem {
266
268
  if (match && match.length === 3) {
267
269
  url = match[1];
268
270
  path = decodeURI(match[2]);
269
- }
270
- else {
271
+ } else {
271
272
  if (isAbsolute(path)) {
272
273
  const resource = URI.file(path);
273
274
  folder = this.rootProvider ? this.rootProvider.getWorkspaceFolder(resource) : null;
@@ -276,17 +277,14 @@ class SessionTreeItem extends BaseTreeItem {
276
277
  const hasMultipleRoots = this.rootProvider.getWorkspace().folders.length > 1;
277
278
  if (hasMultipleRoots) {
278
279
  path = posix.sep + path;
279
- }
280
- else {
280
+ } else {
281
281
  folder = null;
282
282
  }
283
- }
284
- else {
283
+ } else {
285
284
  path = normalize(path);
286
285
  if (isWindows) {
287
286
  path = normalizeDriveLetter(path);
288
- }
289
- else {
287
+ } else {
290
288
  path = tildify(path, (await this._pathService.userHome()).fsPath);
291
289
  }
292
290
  }
@@ -297,11 +295,9 @@ class SessionTreeItem extends BaseTreeItem {
297
295
  if (i === 0 && folder) {
298
296
  const f = folder;
299
297
  leaf = leaf.createIfNeeded(folder.name, parent => ( new RootFolderTreeItem(parent, f)));
300
- }
301
- else if (i === 0 && url) {
298
+ } else if (i === 0 && url) {
302
299
  leaf = leaf.createIfNeeded(url, parent => ( new BaseTreeItem(parent, url)));
303
- }
304
- else {
300
+ } else {
305
301
  leaf = leaf.createIfNeeded(segment, parent => ( new BaseTreeItem(parent, segment)));
306
302
  }
307
303
  });
@@ -332,8 +328,35 @@ function asTreeElement(item, viewState) {
332
328
  };
333
329
  }
334
330
  let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
335
- constructor(options, contextMenuService, keybindingService, instantiationService, viewDescriptorService, configurationService, editorService, contextKeyService, contextService, debugService, labelService, pathService, openerService, themeService, hoverService) {
336
- super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
331
+ constructor(
332
+ options,
333
+ contextMenuService,
334
+ keybindingService,
335
+ instantiationService,
336
+ viewDescriptorService,
337
+ configurationService,
338
+ editorService,
339
+ contextKeyService,
340
+ contextService,
341
+ debugService,
342
+ labelService,
343
+ pathService,
344
+ openerService,
345
+ themeService,
346
+ hoverService
347
+ ) {
348
+ super(
349
+ options,
350
+ keybindingService,
351
+ contextMenuService,
352
+ configurationService,
353
+ contextKeyService,
354
+ viewDescriptorService,
355
+ instantiationService,
356
+ openerService,
357
+ themeService,
358
+ hoverService
359
+ );
337
360
  this.editorService = editorService;
338
361
  this.contextService = contextService;
339
362
  this.debugService = debugService;
@@ -344,39 +367,51 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
344
367
  }
345
368
  renderBody(container) {
346
369
  super.renderBody(container);
347
- this.element.classList.add('debug-pane');
348
- container.classList.add('debug-loaded-scripts', 'show-file-icons');
370
+ this.element.classList.add("debug-pane");
371
+ container.classList.add("debug-loaded-scripts", "show-file-icons");
349
372
  this.treeContainer = renderViewTree(container);
350
373
  this.filter = ( new LoadedScriptsFilter());
351
374
  const root = ( new RootTreeItem(this.pathService, this.contextService, this.labelService));
352
- this.treeLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
375
+ this.treeLabels = this.instantiationService.createInstance(ResourceLabels, {
376
+ onDidChangeVisibility: this.onDidChangeBodyVisibility
377
+ });
353
378
  this._register(this.treeLabels);
354
- const onFileIconThemeChange = (fileIconTheme) => {
355
- this.treeContainer.classList.toggle('align-icons-and-twisties', fileIconTheme.hasFileIcons && !fileIconTheme.hasFolderIcons);
356
- this.treeContainer.classList.toggle('hide-arrows', fileIconTheme.hidesExplorerArrows === true);
379
+ const onFileIconThemeChange = fileIconTheme => {
380
+ this.treeContainer.classList.toggle(
381
+ "align-icons-and-twisties",
382
+ fileIconTheme.hasFileIcons && !fileIconTheme.hasFolderIcons
383
+ );
384
+ this.treeContainer.classList.toggle("hide-arrows", fileIconTheme.hidesExplorerArrows === true);
357
385
  };
358
386
  this._register(this.themeService.onDidFileIconThemeChange(onFileIconThemeChange));
359
387
  onFileIconThemeChange(this.themeService.getFileIconTheme());
360
- this.tree = this.instantiationService.createInstance((WorkbenchCompressibleObjectTree), 'LoadedScriptsView', this.treeContainer, ( new LoadedScriptsDelegate()), [( new LoadedScriptsRenderer(this.treeLabels))], {
361
- compressionEnabled: NEW_STYLE_COMPRESS,
362
- collapseByDefault: true,
363
- hideTwistiesOfChildlessElements: true,
364
- identityProvider: {
365
- getId: (element) => element.getId()
366
- },
367
- keyboardNavigationLabelProvider: {
368
- getKeyboardNavigationLabel: (element) => {
369
- return element.getLabel();
388
+ this.tree = this.instantiationService.createInstance(
389
+ WorkbenchCompressibleObjectTree,
390
+ "LoadedScriptsView",
391
+ this.treeContainer,
392
+ ( new LoadedScriptsDelegate()),
393
+ [( new LoadedScriptsRenderer(this.treeLabels))],
394
+ {
395
+ compressionEnabled: NEW_STYLE_COMPRESS,
396
+ collapseByDefault: true,
397
+ hideTwistiesOfChildlessElements: true,
398
+ identityProvider: {
399
+ getId: element => element.getId()
370
400
  },
371
- getCompressedNodeKeyboardNavigationLabel: (elements) => {
372
- return ( elements.map(e => e.getLabel())).join('/');
373
- }
374
- },
375
- filter: this.filter,
376
- accessibilityProvider: ( new LoadedSciptsAccessibilityProvider()),
377
- overrideStyles: this.getLocationBasedColors().listOverrideStyles
378
- });
379
- const updateView = (viewState) => this.tree.setChildren(null, asTreeElement(root, viewState).children);
401
+ keyboardNavigationLabelProvider: {
402
+ getKeyboardNavigationLabel: element => {
403
+ return element.getLabel();
404
+ },
405
+ getCompressedNodeKeyboardNavigationLabel: elements => {
406
+ return ( elements.map(e => e.getLabel())).join("/");
407
+ }
408
+ },
409
+ filter: this.filter,
410
+ accessibilityProvider: ( new LoadedSciptsAccessibilityProvider()),
411
+ overrideStyles: this.getLocationBasedColors().listOverrideStyles
412
+ }
413
+ );
414
+ const updateView = viewState => this.tree.setChildren(null, asTreeElement(root, viewState).children);
380
415
  updateView();
381
416
  this.changeScheduler = ( new RunOnceScheduler(() => {
382
417
  this.treeNeedsRefreshOnVisible = false;
@@ -389,29 +424,38 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
389
424
  if (e.element instanceof BaseTreeItem) {
390
425
  const source = e.element.getSource();
391
426
  if (source && source.available) {
392
- const nullRange = { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 };
393
- source.openInEditor(this.editorService, nullRange, e.editorOptions.preserveFocus, e.sideBySide, e.editorOptions.pinned);
427
+ const nullRange = {
428
+ startLineNumber: 0,
429
+ startColumn: 0,
430
+ endLineNumber: 0,
431
+ endColumn: 0
432
+ };
433
+ source.openInEditor(
434
+ this.editorService,
435
+ nullRange,
436
+ e.editorOptions.preserveFocus,
437
+ e.sideBySide,
438
+ e.editorOptions.pinned
439
+ );
394
440
  }
395
441
  }
396
442
  }));
397
443
  this._register(this.tree.onDidChangeFocus(() => {
398
444
  const focus = this.tree.getFocus();
399
445
  if (focus instanceof SessionTreeItem) {
400
- this.loadedScriptsItemType.set('session');
401
- }
402
- else {
446
+ this.loadedScriptsItemType.set("session");
447
+ } else {
403
448
  this.loadedScriptsItemType.reset();
404
449
  }
405
450
  }));
406
451
  const scheduleRefreshOnVisible = () => {
407
452
  if (this.isBodyVisible()) {
408
453
  this.changeScheduler.schedule();
409
- }
410
- else {
454
+ } else {
411
455
  this.treeNeedsRefreshOnVisible = true;
412
456
  }
413
457
  };
414
- const addSourcePathsToSession = async (session) => {
458
+ const addSourcePathsToSession = async session => {
415
459
  if (session.capabilities.supportsLoadedSourcesRequest) {
416
460
  const sessionNode = root.add(session);
417
461
  const paths = await session.getLoadedSources();
@@ -421,7 +465,7 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
421
465
  scheduleRefreshOnVisible();
422
466
  }
423
467
  };
424
- const registerSessionListeners = (session) => {
468
+ const registerSessionListeners = session => {
425
469
  this._register(session.onDidChangeName(async () => {
426
470
  const sessionRoot = root.find(session);
427
471
  if (sessionRoot) {
@@ -429,34 +473,38 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
429
473
  scheduleRefreshOnVisible();
430
474
  }
431
475
  }));
432
- this._register(session.onDidLoadedSource(async (event) => {
476
+ this._register(session.onDidLoadedSource(async event => {
433
477
  let sessionRoot;
434
478
  switch (event.reason) {
435
- case 'new':
436
- case 'changed':
437
- sessionRoot = root.add(session);
438
- await sessionRoot.addPath(event.source);
479
+ case "new":
480
+ case "changed":
481
+ sessionRoot = root.add(session);
482
+ await sessionRoot.addPath(event.source);
483
+ scheduleRefreshOnVisible();
484
+ if (event.reason === "changed") {
485
+ DebugContentProvider.refreshDebugContent(event.source.uri);
486
+ }
487
+ break;
488
+ case "removed":
489
+ sessionRoot = root.find(session);
490
+ if (sessionRoot && sessionRoot.removePath(event.source)) {
439
491
  scheduleRefreshOnVisible();
440
- if (event.reason === 'changed') {
441
- DebugContentProvider.refreshDebugContent(event.source.uri);
442
- }
443
- break;
444
- case 'removed':
445
- sessionRoot = root.find(session);
446
- if (sessionRoot && sessionRoot.removePath(event.source)) {
447
- scheduleRefreshOnVisible();
448
- }
449
- break;
450
- default:
451
- this.filter.setFilter(event.source.name);
452
- this.tree.refilter();
453
- break;
492
+ }
493
+ break;
494
+ default:
495
+ this.filter.setFilter(event.source.name);
496
+ this.tree.refilter();
497
+ break;
454
498
  }
455
499
  }));
456
500
  };
457
501
  this._register(this.debugService.onDidNewSession(registerSessionListeners));
458
502
  this.debugService.getModel().getSessions().forEach(registerSessionListeners);
459
- this._register(this.debugService.onDidEndSession(({ session }) => {
503
+ this._register(this.debugService.onDidEndSession((
504
+ {
505
+ session
506
+ }
507
+ ) => {
460
508
  root.remove(session.getId());
461
509
  this.changeScheduler.schedule();
462
510
  }));
@@ -473,7 +521,7 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
473
521
  }
474
522
  if (!viewState && pattern) {
475
523
  const expanded = ( new Set());
476
- const visit = (node) => {
524
+ const visit = node => {
477
525
  if (node.element && !node.collapsed) {
478
526
  expanded.add(node.element.getId());
479
527
  }
@@ -482,10 +530,11 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
482
530
  }
483
531
  };
484
532
  visit(this.tree.getNode());
485
- viewState = { expanded };
533
+ viewState = {
534
+ expanded
535
+ };
486
536
  this.tree.expandAll();
487
- }
488
- else if (!pattern && viewState) {
537
+ } else if (!pattern && viewState) {
489
538
  this.tree.setFocus([]);
490
539
  updateView(viewState);
491
540
  viewState = undefined;
@@ -506,22 +555,7 @@ let LoadedScriptsView = class LoadedScriptsView extends ViewPane {
506
555
  super.dispose();
507
556
  }
508
557
  };
509
- LoadedScriptsView = ( __decorate([
510
- ( __param(1, IContextMenuService)),
511
- ( __param(2, IKeybindingService)),
512
- ( __param(3, IInstantiationService)),
513
- ( __param(4, IViewDescriptorService)),
514
- ( __param(5, IConfigurationService)),
515
- ( __param(6, IEditorService)),
516
- ( __param(7, IContextKeyService)),
517
- ( __param(8, IWorkspaceContextService)),
518
- ( __param(9, IDebugService)),
519
- ( __param(10, ILabelService)),
520
- ( __param(11, IPathService)),
521
- ( __param(12, IOpenerService)),
522
- ( __param(13, IThemeService)),
523
- ( __param(14, IHoverService))
524
- ], LoadedScriptsView));
558
+ LoadedScriptsView = ( __decorate([( __param(1, IContextMenuService)), ( __param(2, IKeybindingService)), ( __param(3, IInstantiationService)), ( __param(4, IViewDescriptorService)), ( __param(5, IConfigurationService)), ( __param(6, IEditorService)), ( __param(7, IContextKeyService)), ( __param(8, IWorkspaceContextService)), ( __param(9, IDebugService)), ( __param(10, ILabelService)), ( __param(11, IPathService)), ( __param(12, IOpenerService)), ( __param(13, IThemeService)), ( __param(14, IHoverService))], LoadedScriptsView));
525
559
  class LoadedScriptsDelegate {
526
560
  getHeight(element) {
527
561
  return 22;
@@ -531,7 +565,9 @@ class LoadedScriptsDelegate {
531
565
  }
532
566
  }
533
567
  class LoadedScriptsRenderer {
534
- static { this.ID = 'lsrenderer'; }
568
+ static {
569
+ this.ID = "lsrenderer";
570
+ }
535
571
  constructor(labels) {
536
572
  this.labels = labels;
537
573
  }
@@ -539,8 +575,12 @@ class LoadedScriptsRenderer {
539
575
  return LoadedScriptsRenderer.ID;
540
576
  }
541
577
  renderTemplate(container) {
542
- const label = this.labels.create(container, { supportHighlights: true });
543
- return { label };
578
+ const label = this.labels.create(container, {
579
+ supportHighlights: true
580
+ });
581
+ return {
582
+ label
583
+ };
544
584
  }
545
585
  renderElement(node, index, data) {
546
586
  const element = node.element;
@@ -561,18 +601,15 @@ class LoadedScriptsRenderer {
561
601
  };
562
602
  if (element instanceof RootFolderTreeItem) {
563
603
  options.fileKind = FileKind.ROOT_FOLDER;
564
- }
565
- else if (element instanceof SessionTreeItem) {
566
- options.title = ( localize(6951, "Debug Session"));
604
+ } else if (element instanceof SessionTreeItem) {
605
+ options.title = ( localize(7262, "Debug Session"));
567
606
  options.hideIcon = true;
568
- }
569
- else if (element instanceof BaseTreeItem) {
607
+ } else if (element instanceof BaseTreeItem) {
570
608
  const src = element.getSource();
571
609
  if (src && src.uri) {
572
610
  label.resource = src.uri;
573
611
  options.fileKind = FileKind.FILE;
574
- }
575
- else {
612
+ } else {
576
613
  options.fileKind = FileKind.FOLDER;
577
614
  }
578
615
  }
@@ -585,20 +622,19 @@ class LoadedScriptsRenderer {
585
622
  }
586
623
  class LoadedSciptsAccessibilityProvider {
587
624
  getWidgetAriaLabel() {
588
- return localize(6952, "Debug Loaded Scripts");
625
+ return localize(7263, "Debug Loaded Scripts");
589
626
  }
590
627
  getAriaLabel(element) {
591
628
  if (element instanceof RootFolderTreeItem) {
592
- return localize(6953, "Workspace folder {0}, loaded script, debug", element.getLabel());
629
+ return localize(7264, "Workspace folder {0}, loaded script, debug", element.getLabel());
593
630
  }
594
631
  if (element instanceof SessionTreeItem) {
595
- return localize(6954, "Session {0}, loaded script, debug", element.getLabel());
632
+ return localize(7265, "Session {0}, loaded script, debug", element.getLabel());
596
633
  }
597
634
  if (element.hasChildren()) {
598
- return localize(6955, "Folder {0}, loaded script, debug", element.getLabel());
599
- }
600
- else {
601
- return localize(6956, "{0}, loaded script, debug", element.getLabel());
635
+ return localize(7266, "Folder {0}, loaded script, debug", element.getLabel());
636
+ } else {
637
+ return localize(7267, "{0}, loaded script, debug", element.getLabel());
602
638
  }
603
639
  }
604
640
  }
@@ -623,16 +659,16 @@ class LoadedScriptsFilter {
623
659
  registerAction2(class Collapse extends ViewAction {
624
660
  constructor() {
625
661
  super({
626
- id: 'loadedScripts.collapse',
662
+ id: "loadedScripts.collapse",
627
663
  viewId: LOADED_SCRIPTS_VIEW_ID,
628
- title: ( localize(6957, "Collapse All")),
664
+ title: ( localize(7268, "Collapse All")),
629
665
  f1: false,
630
666
  icon: Codicon.collapseAll,
631
667
  menu: {
632
668
  id: MenuId.ViewTitle,
633
669
  order: 30,
634
- group: 'navigation',
635
- when: ( ContextKeyExpr.equals('view', LOADED_SCRIPTS_VIEW_ID))
670
+ group: "navigation",
671
+ when: ( ContextKeyExpr.equals("view", LOADED_SCRIPTS_VIEW_ID))
636
672
  }
637
673
  });
638
674
  }