@codingame/monaco-vscode-debug-service-override 25.1.2 → 26.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 (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
@@ -19,7 +19,18 @@ import { filter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objec
19
19
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
20
20
 
21
21
  let Debugger = class Debugger {
22
- constructor(adapterManager, dbgContribution, extensionDescription, configurationService, resourcePropertiesService, configurationResolverService, environmentService, debugService, contextKeyService, productService) {
22
+ constructor(
23
+ adapterManager,
24
+ dbgContribution,
25
+ extensionDescription,
26
+ configurationService,
27
+ resourcePropertiesService,
28
+ configurationResolverService,
29
+ environmentService,
30
+ debugService,
31
+ contextKeyService,
32
+ productService
33
+ ) {
23
34
  this.adapterManager = adapterManager;
24
35
  this.configurationService = configurationService;
25
36
  this.resourcePropertiesService = resourcePropertiesService;
@@ -29,10 +40,12 @@ let Debugger = class Debugger {
29
40
  this.contextKeyService = contextKeyService;
30
41
  this.productService = productService;
31
42
  this.mergedExtensionDescriptions = [];
32
- this.debuggerContribution = { type: dbgContribution.type };
43
+ this.debuggerContribution = {
44
+ type: dbgContribution.type
45
+ };
33
46
  this.merge(dbgContribution, extensionDescription);
34
- this.debuggerWhen = typeof this.debuggerContribution.when === 'string' ? ContextKeyExpr.deserialize(this.debuggerContribution.when) : undefined;
35
- this.debuggerHiddenWhen = typeof this.debuggerContribution.hiddenWhen === 'string' ? ContextKeyExpr.deserialize(this.debuggerContribution.hiddenWhen) : undefined;
47
+ this.debuggerWhen = typeof this.debuggerContribution.when === "string" ? ContextKeyExpr.deserialize(this.debuggerContribution.when) : undefined;
48
+ this.debuggerHiddenWhen = typeof this.debuggerContribution.hiddenWhen === "string" ? ContextKeyExpr.deserialize(this.debuggerContribution.hiddenWhen) : undefined;
36
49
  }
37
50
  merge(otherDebuggerContribution, extensionDescription) {
38
51
  function mixin(destination, source, overwrite, level = 0) {
@@ -41,20 +54,18 @@ let Debugger = class Debugger {
41
54
  }
42
55
  if (isObject(source)) {
43
56
  ( Object.keys(source)).forEach(key => {
44
- if (key !== '__proto__') {
57
+ if (key !== "__proto__") {
45
58
  if (isObject(destination[key]) && isObject(source[key])) {
46
59
  mixin(destination[key], source[key], overwrite, level + 1);
47
- }
48
- else {
60
+ } else {
49
61
  if (key in destination) {
50
62
  if (overwrite) {
51
- if (level === 0 && key === 'type') ;
52
- else {
63
+ if (level === 0 && key === "type")
64
+ ; else {
53
65
  destination[key] = source[key];
54
66
  }
55
67
  }
56
- }
57
- else {
68
+ } else {
58
69
  destination[key] = source[key];
59
70
  }
60
71
  }
@@ -65,7 +76,11 @@ let Debugger = class Debugger {
65
76
  }
66
77
  if (this.mergedExtensionDescriptions.indexOf(extensionDescription) < 0) {
67
78
  this.mergedExtensionDescriptions.push(extensionDescription);
68
- mixin(this.debuggerContribution, otherDebuggerContribution, extensionDescription.isBuiltin);
79
+ mixin(
80
+ this.debuggerContribution,
81
+ otherDebuggerContribution,
82
+ extensionDescription.isBuiltin
83
+ );
69
84
  if (isDebuggerMainContribution(otherDebuggerContribution)) {
70
85
  this.mainExtensionDescription = extensionDescription;
71
86
  }
@@ -73,19 +88,27 @@ let Debugger = class Debugger {
73
88
  }
74
89
  async startDebugging(configuration, parentSessionId) {
75
90
  const parentSession = this.debugService.getModel().getSession(parentSessionId);
76
- return await this.debugService.startDebugging(undefined, configuration, { parentSession }, undefined);
91
+ return await this.debugService.startDebugging(undefined, configuration, {
92
+ parentSession
93
+ }, undefined);
77
94
  }
78
95
  async createDebugAdapter(session) {
79
- await this.adapterManager.activateDebuggers('onDebugAdapterProtocolTracker', this.type);
96
+ await this.adapterManager.activateDebuggers("onDebugAdapterProtocolTracker", this.type);
80
97
  const da = this.adapterManager.createDebugAdapter(session);
81
98
  if (da) {
82
99
  return Promise.resolve(da);
83
100
  }
84
- throw ( new Error(( localize(7161, "Cannot find debug adapter for type '{0}'.", this.type))));
101
+ throw ( new Error(( localize(7472, "Cannot find debug adapter for type '{0}'.", this.type))));
85
102
  }
86
103
  async substituteVariables(folder, config) {
87
104
  const substitutedConfig = await this.adapterManager.substituteVariables(this.type, folder, config);
88
- return await this.configurationResolverService.resolveWithInteractionReplace(folder, substitutedConfig, 'launch', this.variables, substitutedConfig.__configurationTarget);
105
+ return await this.configurationResolverService.resolveWithInteractionReplace(
106
+ folder,
107
+ substitutedConfig,
108
+ "launch",
109
+ this.variables,
110
+ substitutedConfig.__configurationTarget
111
+ );
89
112
  }
90
113
  runInTerminal(args, sessionId) {
91
114
  return this.adapterManager.runInTerminal(this.type, args, sessionId);
@@ -140,27 +163,30 @@ let Debugger = class Debugger {
140
163
  if (initialConfigs) {
141
164
  initialConfigurations = initialConfigurations.concat(initialConfigs);
142
165
  }
143
- const eol = this.resourcePropertiesService.getEOL(( URI.from({ scheme: Schemas.untitled, path: '1' }))) === '\r\n' ? '\r\n' : '\n';
144
- const configs = ( JSON.stringify(initialConfigurations, null, '\t').split('\n').map(line => '\t' + line)).join(eol).trim();
145
- const comment1 = ( localize(7162, "Use IntelliSense to learn about possible attributes."));
146
- const comment2 = ( localize(7163, "Hover to view descriptions of existing attributes."));
166
+ const eol = this.resourcePropertiesService.getEOL(( URI.from({
167
+ scheme: Schemas.untitled,
168
+ path: "1"
169
+ }))) === "\r\n" ? "\r\n" : "\n";
170
+ const configs = ( JSON.stringify(initialConfigurations, null, "\t").split("\n").map(line => "\t" + line)).join(eol).trim();
171
+ const comment1 = ( localize(7473, "Use IntelliSense to learn about possible attributes."));
172
+ const comment2 = ( localize(7474, "Hover to view descriptions of existing attributes."));
147
173
  const comment3 = ( localize(
148
- 7164,
174
+ 7475,
149
175
  "For more information, visit: {0}",
150
- 'https://go.microsoft.com/fwlink/?linkid=830387'
176
+ "https://go.microsoft.com/fwlink/?linkid=830387"
151
177
  ));
152
178
  let content = [
153
- '{',
179
+ "{",
154
180
  `\t// ${comment1}`,
155
181
  `\t// ${comment2}`,
156
182
  `\t// ${comment3}`,
157
183
  `\t"version": "0.2.0",`,
158
184
  `\t"configurations": ${configs}`,
159
- '}'
185
+ "}"
160
186
  ].join(eol);
161
187
  const editorConfig = this.configurationService.getValue();
162
188
  if (editorConfig.editor && editorConfig.editor.insertSpaces) {
163
- content = content.replace(( new RegExp('\t', 'g')), ' '.repeat(editorConfig.editor.tabSize));
189
+ content = content.replace(( new RegExp("\t", "g")), " ".repeat(editorConfig.editor.tabSize));
164
190
  }
165
191
  return Promise.resolve(content);
166
192
  }
@@ -172,7 +198,7 @@ let Debugger = class Debugger {
172
198
  if (!aiKey) {
173
199
  return undefined;
174
200
  }
175
- const sendErrorTelemtry = cleanRemoteAuthority(this.environmentService.remoteAuthority, this.productService) !== 'other';
201
+ const sendErrorTelemtry = cleanRemoteAuthority(this.environmentService.remoteAuthority, this.productService) !== "other";
176
202
  return {
177
203
  id: `${this.getMainExtensionDescriptor().publisher}.${this.type}`,
178
204
  aiKey,
@@ -186,35 +212,35 @@ let Debugger = class Debugger {
186
212
  return (Object.entries(this.debuggerContribution.configurationAttributes).map(([request, attributes]) => {
187
213
  const definitionId = `${this.type}:${request}`;
188
214
  const platformSpecificDefinitionId = `${this.type}:${request}:platform`;
189
- const defaultRequired = ['name', 'type', 'request'];
215
+ const defaultRequired = ["name", "type", "request"];
190
216
  attributes.required = attributes.required && attributes.required.length ? defaultRequired.concat(attributes.required) : defaultRequired;
191
217
  attributes.additionalProperties = false;
192
- attributes.type = 'object';
218
+ attributes.type = "object";
193
219
  if (!attributes.properties) {
194
220
  attributes.properties = {};
195
221
  }
196
222
  const properties = attributes.properties;
197
- properties['type'] = {
223
+ properties["type"] = {
198
224
  enum: [this.type],
199
225
  enumDescriptions: [this.label],
200
- description: ( localize(7165, "Type of configuration.")),
201
- pattern: '^(?!node2)',
226
+ description: ( localize(7476, "Type of configuration.")),
227
+ pattern: "^(?!node2)",
202
228
  deprecationMessage: this.debuggerContribution.deprecated || (this.enabled ? undefined : debuggerDisabledMessage(this.type)),
203
229
  doNotSuggest: !!this.debuggerContribution.deprecated,
204
230
  errorMessage: ( localize(
205
- 7166,
231
+ 7477,
206
232
  "The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled."
207
233
  )),
208
234
  patternErrorMessage: ( localize(
209
- 7167,
235
+ 7478,
210
236
  "\"node2\" is no longer supported, use \"node\" instead and set the \"protocol\" attribute to \"inspector\"."
211
237
  ))
212
238
  };
213
- properties['request'] = {
239
+ properties["request"] = {
214
240
  enum: [request],
215
- description: ( localize(7168, "Request type of configuration. Can be \"launch\" or \"attach\".")),
241
+ description: ( localize(7479, "Request type of configuration. Can be \"launch\" or \"attach\"."))
216
242
  };
217
- for (const prop in definitions['common'].properties) {
243
+ for (const prop in definitions["common"].properties) {
218
244
  properties[prop] = {
219
245
  $ref: `#/definitions/common/properties/${prop}`
220
246
  };
@@ -222,27 +248,31 @@ let Debugger = class Debugger {
222
248
  ( Object.keys(properties)).forEach(name => {
223
249
  applyDeprecatedVariableMessage(properties[name]);
224
250
  });
225
- definitions[definitionId] = { ...attributes };
251
+ definitions[definitionId] = {
252
+ ...attributes
253
+ };
226
254
  definitions[platformSpecificDefinitionId] = {
227
- type: 'object',
255
+ type: "object",
228
256
  additionalProperties: false,
229
- properties: filter(properties, key => key !== 'type' && key !== 'request' && key !== 'name')
257
+ properties: filter(properties, key => key !== "type" && key !== "request" && key !== "name")
258
+ };
259
+ const attributesCopy = {
260
+ ...attributes
230
261
  };
231
- const attributesCopy = { ...attributes };
232
262
  attributesCopy.properties = {
233
263
  ...properties,
234
264
  ...{
235
265
  windows: {
236
266
  $ref: `#/definitions/${platformSpecificDefinitionId}`,
237
- description: ( localize(7169, "Windows specific launch configuration attributes.")),
267
+ description: ( localize(7480, "Windows specific launch configuration attributes."))
238
268
  },
239
269
  osx: {
240
270
  $ref: `#/definitions/${platformSpecificDefinitionId}`,
241
- description: ( localize(7170, "OS X specific launch configuration attributes.")),
271
+ description: ( localize(7481, "OS X specific launch configuration attributes."))
242
272
  },
243
273
  linux: {
244
274
  $ref: `#/definitions/${platformSpecificDefinitionId}`,
245
- description: ( localize(7171, "Linux specific launch configuration attributes.")),
275
+ description: ( localize(7482, "Linux specific launch configuration attributes."))
246
276
  }
247
277
  }
248
278
  };
@@ -250,14 +280,6 @@ let Debugger = class Debugger {
250
280
  }));
251
281
  }
252
282
  };
253
- Debugger = ( __decorate([
254
- ( __param(3, IConfigurationService)),
255
- ( __param(4, ITextResourcePropertiesService)),
256
- ( __param(5, IConfigurationResolverService)),
257
- ( __param(6, IWorkbenchEnvironmentService)),
258
- ( __param(7, IDebugService)),
259
- ( __param(8, IContextKeyService)),
260
- ( __param(9, IProductService))
261
- ], Debugger));
283
+ Debugger = ( __decorate([( __param(3, IConfigurationService)), ( __param(4, ITextResourcePropertiesService)), ( __param(5, IConfigurationResolverService)), ( __param(6, IWorkbenchEnvironmentService)), ( __param(7, IDebugService)), ( __param(8, IContextKeyService)), ( __param(9, IProductService))], Debugger));
262
284
 
263
285
  export { Debugger };
@@ -6,31 +6,32 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
6
6
  import { IDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service';
7
7
 
8
8
  let ReplAccessibilityAnnouncer = class ReplAccessibilityAnnouncer extends Disposable {
9
- static { this.ID = 'debug.replAccessibilityAnnouncer'; }
9
+ static {
10
+ this.ID = "debug.replAccessibilityAnnouncer";
11
+ }
10
12
  constructor(debugService, accessibilityService, logService) {
11
13
  super();
12
14
  const viewModel = debugService.getViewModel();
13
15
  const mutableDispoable = this._register(( new MutableDisposable()));
14
- this._register(viewModel.onDidFocusSession((session) => {
16
+ this._register(viewModel.onDidFocusSession(session => {
15
17
  mutableDispoable.clear();
16
18
  if (!session) {
17
19
  return;
18
20
  }
19
- mutableDispoable.value = session.onDidChangeReplElements((element) => {
20
- if (!element || !('originalExpression' in element)) {
21
+ mutableDispoable.value = session.onDidChangeReplElements(element => {
22
+ if (!element || !("originalExpression" in element)) {
21
23
  return;
22
24
  }
23
25
  const value = ( element.toString());
24
26
  accessibilityService.status(value);
25
- logService.trace('ReplAccessibilityAnnouncer#onDidChangeReplElements', element.originalExpression + ': ' + value);
27
+ logService.trace(
28
+ "ReplAccessibilityAnnouncer#onDidChangeReplElements",
29
+ element.originalExpression + ": " + value
30
+ );
26
31
  });
27
32
  }));
28
33
  }
29
34
  };
30
- ReplAccessibilityAnnouncer = ( __decorate([
31
- ( __param(0, IDebugService)),
32
- ( __param(1, IAccessibilityService)),
33
- ( __param(2, ILogService))
34
- ], ReplAccessibilityAnnouncer));
35
+ ReplAccessibilityAnnouncer = ( __decorate([( __param(0, IDebugService)), ( __param(1, IAccessibilityService)), ( __param(2, ILogService))], ReplAccessibilityAnnouncer));
35
36
 
36
37
  export { ReplAccessibilityAnnouncer };
@@ -7,14 +7,14 @@ import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
7
7
  import { INotebookKernelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
8
8
  import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
9
9
 
10
- const COPY_NOTEBOOK_VARIABLE_VALUE_ID = 'workbench.debug.viewlet.action.copyWorkspaceVariableValue';
11
- const COPY_NOTEBOOK_VARIABLE_VALUE_LABEL = ( localize(9318, "Copy Value"));
10
+ const COPY_NOTEBOOK_VARIABLE_VALUE_ID = "workbench.debug.viewlet.action.copyWorkspaceVariableValue";
11
+ const COPY_NOTEBOOK_VARIABLE_VALUE_LABEL = ( localize(9638, "Copy Value"));
12
12
  registerAction2(class extends Action2 {
13
13
  constructor() {
14
14
  super({
15
15
  id: COPY_NOTEBOOK_VARIABLE_VALUE_ID,
16
16
  title: COPY_NOTEBOOK_VARIABLE_VALUE_LABEL,
17
- f1: false,
17
+ f1: false
18
18
  });
19
19
  }
20
20
  run(accessor, context) {
@@ -27,9 +27,9 @@ registerAction2(class extends Action2 {
27
27
  registerAction2(class extends Action2 {
28
28
  constructor() {
29
29
  super({
30
- id: '_executeNotebookVariableProvider',
31
- title: ( localize(9319, "Execute Notebook Variable Provider")),
32
- f1: false,
30
+ id: "_executeNotebookVariableProvider",
31
+ title: ( localize(9639, "Execute Notebook Variable Provider")),
32
+ f1: false
33
33
  });
34
34
  }
35
35
  async run(accessor, resource) {
@@ -45,7 +45,7 @@ registerAction2(class extends Action2 {
45
45
  }
46
46
  const selectedKernel = notebookKernelService.getMatchingKernel(notebookTextModel).selected;
47
47
  if (selectedKernel && selectedKernel.hasVariableProvider) {
48
- const variableIterable = selectedKernel.provideVariables(notebookTextModel.uri, undefined, 'named', 0, CancellationToken.None);
48
+ const variableIterable = selectedKernel.provideVariables(notebookTextModel.uri, undefined, "named", 0, CancellationToken.None);
49
49
  const collected = [];
50
50
  for await (const variable of variableIterable) {
51
51
  collected.push(variable);