@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
@@ -23,15 +23,15 @@ import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/obse
23
23
  import { ObservablePromise } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils/promise';
24
24
 
25
25
  var PickerMode;
26
- (function (PickerMode) {
26
+ (function(PickerMode) {
27
27
  PickerMode["Main"] = "main";
28
28
  PickerMode["Expression"] = "expression";
29
29
  })(PickerMode || (PickerMode = {}));
30
30
  let DebugSessionContextPick = class DebugSessionContextPick {
31
31
  constructor(debugService) {
32
32
  this.debugService = debugService;
33
- this.type = 'pickerPick';
34
- this.label = ( localize(6714, 'Debug Session...'));
33
+ this.type = "pickerPick";
34
+ this.label = ( localize(7024, "Debug Session..."));
35
35
  this.icon = Codicon.debug;
36
36
  this.ordinal = -200;
37
37
  }
@@ -42,11 +42,11 @@ let DebugSessionContextPick = class DebugSessionContextPick {
42
42
  }
43
43
  asPicker(_widget) {
44
44
  const store = ( new DisposableStore());
45
- const mode = observableValue('debugPicker.mode', PickerMode.Main);
46
- const query = observableValue('debugPicker.query', '');
45
+ const mode = observableValue("debugPicker.mode", PickerMode.Main);
46
+ const query = observableValue("debugPicker.query", "");
47
47
  const picksObservable = this.createPicksObservable(mode, query, store);
48
48
  return {
49
- placeholder: ( localize(6715, 'Select debug data to attach')),
49
+ placeholder: ( localize(7025, "Select debug data to attach")),
50
50
  picks: (_queryObs, token) => {
51
51
  store.add(autorun(reader => {
52
52
  query.set(_queryObs.read(reader), undefined);
@@ -62,7 +62,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
62
62
  }
63
63
  return false;
64
64
  },
65
- dispose: () => store.dispose(),
65
+ dispose: () => store.dispose()
66
66
  };
67
67
  }
68
68
  createPicksObservable(mode, query, store) {
@@ -71,8 +71,7 @@ let DebugSessionContextPick = class DebugSessionContextPick {
71
71
  const currentMode = mode.read(reader);
72
72
  if (currentMode === PickerMode.Expression) {
73
73
  return this.getExpressionPicks(debouncedQuery, store);
74
- }
75
- else {
74
+ } else {
76
75
  return this.getMainPicks(mode);
77
76
  }
78
77
  }).flatten();
@@ -83,7 +82,10 @@ let DebugSessionContextPick = class DebugSessionContextPick {
83
82
  });
84
83
  return ( promise.map((value, reader) => {
85
84
  const result = value.promiseResult.read(reader);
86
- return { picks: result?.data || [], busy: result === undefined };
85
+ return {
86
+ picks: result?.data || [],
87
+ busy: result === undefined
88
+ };
87
89
  }));
88
90
  }
89
91
  async buildMainPicks(mode) {
@@ -95,43 +97,47 @@ let DebugSessionContextPick = class DebugSessionContextPick {
95
97
  return picks;
96
98
  }
97
99
  picks.push({
98
- label: ( localize(6716, 'Expression Value...')),
100
+ label: ( localize(7026, "Expression Value...")),
99
101
  iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
100
102
  asAttachment: () => {
101
103
  mode.set(PickerMode.Expression, undefined);
102
- return 'noop';
103
- },
104
+ return "noop";
105
+ }
104
106
  });
105
107
  const watches = this.debugService.getModel().getWatchExpressions();
106
108
  if (watches.length > 0) {
107
- picks.push({ type: 'separator', label: ( localize(6717, 'Watch Expressions')) });
109
+ picks.push({
110
+ type: "separator",
111
+ label: ( localize(7027, "Watch Expressions"))
112
+ });
108
113
  for (const watch of watches) {
109
114
  picks.push({
110
115
  label: watch.name,
111
116
  description: watch.value,
112
117
  iconClass: ThemeIcon.asClassName(Codicon.eye),
113
- asAttachment: () => createDebugAttachments(stackFrame, createDebugVariableEntry(watch)),
118
+ asAttachment: () => createDebugAttachments(stackFrame, createDebugVariableEntry(watch))
114
119
  });
115
120
  }
116
121
  }
117
122
  let scopes = [];
118
123
  try {
119
124
  scopes = await stackFrame.getScopes();
120
- }
121
- catch {
122
- }
125
+ } catch {}
123
126
  for (const scope of scopes) {
124
127
  if (scope.expensive && !scope.childrenHaveBeenLoaded) {
125
128
  continue;
126
129
  }
127
- picks.push({ type: 'separator', label: scope.name });
130
+ picks.push({
131
+ type: "separator",
132
+ label: scope.name
133
+ });
128
134
  try {
129
135
  const variables = await scope.getChildren();
130
136
  if (variables.length > 1) {
131
137
  picks.push({
132
- label: ( localize(6718, 'All variables in {0}', scope.name)),
138
+ label: ( localize(7028, "All variables in {0}", scope.name)),
133
139
  iconClass: ThemeIcon.asClassName(Codicon.symbolNamespace),
134
- asAttachment: () => createDebugAttachments(stackFrame, createScopeEntry(scope, variables)),
140
+ asAttachment: () => createDebugAttachments(stackFrame, createScopeEntry(scope, variables))
135
141
  });
136
142
  }
137
143
  for (const variable of variables) {
@@ -139,17 +145,15 @@ let DebugSessionContextPick = class DebugSessionContextPick {
139
145
  label: variable.name,
140
146
  description: formatVariableDescription(variable),
141
147
  iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
142
- asAttachment: () => createDebugAttachments(stackFrame, createDebugVariableEntry(variable)),
148
+ asAttachment: () => createDebugAttachments(stackFrame, createDebugVariableEntry(variable))
143
149
  });
144
150
  }
145
- }
146
- catch {
147
- }
151
+ } catch {}
148
152
  }
149
153
  return picks;
150
154
  }
151
155
  getExpressionPicks(query, _store) {
152
- const promise = derived((reader) => {
156
+ const promise = derived(reader => {
153
157
  const queryValue = query.read(reader);
154
158
  const cts = ( new CancellationTokenSource());
155
159
  reader.store.add(toDisposable(() => cts.dispose(true)));
@@ -157,29 +161,32 @@ let DebugSessionContextPick = class DebugSessionContextPick {
157
161
  });
158
162
  return ( promise.map((value, r) => {
159
163
  const result = value.promiseResult.read(r);
160
- return { picks: result?.data || [], busy: result === undefined };
164
+ return {
165
+ picks: result?.data || [],
166
+ busy: result === undefined
167
+ };
161
168
  }));
162
169
  }
163
170
  async evaluateExpression(expression, token) {
164
171
  if (!expression.trim()) {
165
172
  return [{
166
- label: ( localize(6719, 'Type an expression to evaluate...')),
167
- disabled: true,
168
- asAttachment: () => 'noop',
169
- }];
173
+ label: ( localize(7029, "Type an expression to evaluate...")),
174
+ disabled: true,
175
+ asAttachment: () => "noop"
176
+ }];
170
177
  }
171
178
  const viewModel = this.debugService.getViewModel();
172
179
  const session = viewModel.focusedSession;
173
180
  const stackFrame = viewModel.focusedStackFrame;
174
181
  if (!session || !stackFrame) {
175
182
  return [{
176
- label: ( localize(6720, 'No active debug session')),
177
- disabled: true,
178
- asAttachment: () => 'noop',
179
- }];
183
+ label: ( localize(7030, "No active debug session")),
184
+ disabled: true,
185
+ asAttachment: () => "noop"
186
+ }];
180
187
  }
181
188
  try {
182
- const response = await session.evaluate(expression, stackFrame.frameId, 'watch');
189
+ const response = await session.evaluate(expression, stackFrame.frameId, "watch");
183
190
  if (token.isCancellationRequested) {
184
191
  return [];
185
192
  }
@@ -187,47 +194,43 @@ let DebugSessionContextPick = class DebugSessionContextPick {
187
194
  const resultValue = response.body.result;
188
195
  const resultType = response.body.type;
189
196
  return [{
190
- label: expression,
191
- description: formatExpressionResult(resultValue, resultType),
192
- iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
193
- asAttachment: () => createDebugAttachments(stackFrame, {
194
- kind: 'debugVariable',
195
- id: `debug-expression:${expression}`,
196
- name: expression,
197
- fullName: expression,
198
- icon: Codicon.debug,
199
- value: resultValue,
200
- expression: expression,
201
- type: resultType,
202
- modelDescription: formatModelDescription(expression, resultValue, resultType),
203
- }),
204
- }];
205
- }
206
- else {
197
+ label: expression,
198
+ description: formatExpressionResult(resultValue, resultType),
199
+ iconClass: ThemeIcon.asClassName(Codicon.symbolVariable),
200
+ asAttachment: () => createDebugAttachments(stackFrame, {
201
+ kind: "debugVariable",
202
+ id: `debug-expression:${expression}`,
203
+ name: expression,
204
+ fullName: expression,
205
+ icon: Codicon.debug,
206
+ value: resultValue,
207
+ expression: expression,
208
+ type: resultType,
209
+ modelDescription: formatModelDescription(expression, resultValue, resultType)
210
+ })
211
+ }];
212
+ } else {
207
213
  return [{
208
- label: expression,
209
- description: ( localize(6721, 'No result')),
210
- disabled: true,
211
- asAttachment: () => 'noop',
212
- }];
213
- }
214
- }
215
- catch (err) {
216
- return [{
217
214
  label: expression,
218
- description: err instanceof Error ? err.message : ( localize(6722, 'Evaluation error')),
215
+ description: ( localize(7031, "No result")),
219
216
  disabled: true,
220
- asAttachment: () => 'noop',
217
+ asAttachment: () => "noop"
221
218
  }];
219
+ }
220
+ } catch (err) {
221
+ return [{
222
+ label: expression,
223
+ description: err instanceof Error ? err.message : ( localize(7032, "Evaluation error")),
224
+ disabled: true,
225
+ asAttachment: () => "noop"
226
+ }];
222
227
  }
223
228
  }
224
229
  };
225
- DebugSessionContextPick = ( __decorate([
226
- ( __param(0, IDebugService))
227
- ], DebugSessionContextPick));
230
+ DebugSessionContextPick = ( __decorate([( __param(0, IDebugService))], DebugSessionContextPick));
228
231
  function createDebugVariableEntry(expression) {
229
232
  return {
230
- kind: 'debugVariable',
233
+ kind: "debugVariable",
231
234
  id: `debug-variable:${expression.getId()}`,
232
235
  name: expression.name,
233
236
  fullName: expression.name,
@@ -235,7 +238,7 @@ function createDebugVariableEntry(expression) {
235
238
  value: expression.value,
236
239
  expression: expression.name,
237
240
  type: expression.type,
238
- modelDescription: formatModelDescription(expression.name, expression.value, expression.type),
241
+ modelDescription: formatModelDescription(expression.name, expression.value, expression.type)
239
242
  };
240
243
  }
241
244
  function createPausedLocationEntry(stackFrame) {
@@ -245,31 +248,31 @@ function createPausedLocationEntry(stackFrame) {
245
248
  range = range.setEndPosition(range.startLineNumber + 1, 1);
246
249
  }
247
250
  return {
248
- kind: 'file',
249
- value: { uri, range },
251
+ kind: "file",
252
+ value: {
253
+ uri,
254
+ range
255
+ },
250
256
  id: `debug-paused-location:${( uri.toString())}:${range.startLineNumber}`,
251
257
  name: basename(uri),
252
- modelDescription: 'The debugger is currently paused at this location',
258
+ modelDescription: "The debugger is currently paused at this location"
253
259
  };
254
260
  }
255
261
  function createDebugAttachments(stackFrame, variableEntry) {
256
- return [
257
- createPausedLocationEntry(stackFrame),
258
- variableEntry,
259
- ];
262
+ return [createPausedLocationEntry(stackFrame), variableEntry];
260
263
  }
261
264
  function createScopeEntry(scope, variables) {
262
- const variablesSummary = ( variables.map(v => `${v.name}: ${v.value}`)).join('\n');
265
+ const variablesSummary = ( variables.map(v => `${v.name}: ${v.value}`)).join("\n");
263
266
  return {
264
- kind: 'debugVariable',
267
+ kind: "debugVariable",
265
268
  id: `debug-scope:${scope.name}`,
266
269
  name: `Scope: ${scope.name}`,
267
270
  fullName: `Scope: ${scope.name}`,
268
271
  icon: Codicon.debug,
269
272
  value: variablesSummary,
270
273
  expression: scope.name,
271
- type: 'scope',
272
- modelDescription: `Debug scope "${scope.name}" with ${variables.length} variables:\n${variablesSummary}`,
274
+ type: "scope",
275
+ modelDescription: `Debug scope "${scope.name}" with ${variables.length} variables:\n${variablesSummary}`
273
276
  };
274
277
  }
275
278
  function formatVariableDescription(expression) {
@@ -278,13 +281,13 @@ function formatVariableDescription(expression) {
278
281
  if (type && value) {
279
282
  return `${type}: ${value}`;
280
283
  }
281
- return value || type || '';
284
+ return value || type || "";
282
285
  }
283
286
  function formatExpressionResult(value, type) {
284
287
  if (type && value) {
285
288
  return `${type}: ${value}`;
286
289
  }
287
- return value || type || '';
290
+ return value || type || "";
288
291
  }
289
292
  function formatModelDescription(name, value, type) {
290
293
  let description = `Debug variable "${name}"`;
@@ -295,25 +298,26 @@ function formatModelDescription(name, value, type) {
295
298
  return description;
296
299
  }
297
300
  let DebugChatContextContribution = class DebugChatContextContribution extends Disposable {
298
- static { this.ID = 'workbench.contrib.chat.debugChatContextContribution'; }
301
+ static {
302
+ this.ID = "workbench.contrib.chat.debugChatContextContribution";
303
+ }
299
304
  constructor(contextPickService, instantiationService) {
300
305
  super();
301
- this._register(contextPickService.registerChatContextItem(instantiationService.createInstance(DebugSessionContextPick)));
306
+ this._register(
307
+ contextPickService.registerChatContextItem(instantiationService.createInstance(DebugSessionContextPick))
308
+ );
302
309
  }
303
310
  };
304
- DebugChatContextContribution = ( __decorate([
305
- ( __param(0, IChatContextPickService)),
306
- ( __param(1, IInstantiationService))
307
- ], DebugChatContextContribution));
311
+ DebugChatContextContribution = ( __decorate([( __param(0, IChatContextPickService)), ( __param(1, IInstantiationService))], DebugChatContextContribution));
308
312
  registerAction2(class extends Action2 {
309
313
  constructor() {
310
314
  super({
311
- id: 'workbench.debug.action.addVariableToChat',
312
- title: ( localize(6723, 'Add to Chat')),
315
+ id: "workbench.debug.action.addVariableToChat",
316
+ title: ( localize(7033, "Add to Chat")),
313
317
  f1: false,
314
318
  menu: {
315
319
  id: MenuId.DebugVariablesContext,
316
- group: 'z_commands',
320
+ group: "z_commands",
317
321
  order: 110,
318
322
  when: ChatContextKeys.enabled
319
323
  }
@@ -339,12 +343,12 @@ registerAction2(class extends Action2 {
339
343
  registerAction2(class extends Action2 {
340
344
  constructor() {
341
345
  super({
342
- id: 'workbench.debug.action.addWatchExpressionToChat',
343
- title: ( localize(6723, 'Add to Chat')),
346
+ id: "workbench.debug.action.addWatchExpressionToChat",
347
+ title: ( localize(7033, "Add to Chat")),
344
348
  f1: false,
345
349
  menu: {
346
350
  id: MenuId.DebugWatchContext,
347
- group: 'z_commands',
351
+ group: "z_commands",
348
352
  order: 110,
349
353
  when: ChatContextKeys.enabled
350
354
  }
@@ -367,12 +371,12 @@ registerAction2(class extends Action2 {
367
371
  registerAction2(class extends Action2 {
368
372
  constructor() {
369
373
  super({
370
- id: 'workbench.debug.action.addScopeToChat',
371
- title: ( localize(6723, 'Add to Chat')),
374
+ id: "workbench.debug.action.addScopeToChat",
375
+ title: ( localize(7033, "Add to Chat")),
372
376
  f1: false,
373
377
  menu: {
374
378
  id: MenuId.DebugScopesContext,
375
- group: 'z_commands',
379
+ group: "z_commands",
376
380
  order: 1,
377
381
  when: ChatContextKeys.enabled
378
382
  }
@@ -398,13 +402,11 @@ registerAction2(class extends Action2 {
398
402
  widget.attachmentModel.addContext(createPausedLocationEntry(stackFrame));
399
403
  widget.attachmentModel.addContext(createScopeEntry(scope, variables));
400
404
  }
401
- }
402
- catch {
403
- }
405
+ } catch {}
404
406
  }
405
407
  });
406
408
  function isVariablesContext(context) {
407
- return typeof context === 'object' && context !== null && 'variable' in context && 'sessionId' in context;
409
+ return typeof context === "object" && context !== null && "variable" in context && "sessionId" in context;
408
410
  }
409
411
  function createDebugVariableEntryFromContext(context) {
410
412
  if (context instanceof Variable) {
@@ -413,7 +415,7 @@ function createDebugVariableEntryFromContext(context) {
413
415
  if (isVariablesContext(context)) {
414
416
  const variable = context.variable;
415
417
  return {
416
- kind: 'debugVariable',
418
+ kind: "debugVariable",
417
419
  id: `debug-variable:${variable.name}`,
418
420
  name: variable.name,
419
421
  fullName: variable.evaluateName ?? variable.name,
@@ -421,7 +423,7 @@ function createDebugVariableEntryFromContext(context) {
421
423
  value: variable.value,
422
424
  expression: variable.evaluateName ?? variable.name,
423
425
  type: variable.type,
424
- modelDescription: formatModelDescription(variable.evaluateName || variable.name, variable.value, variable.type),
426
+ modelDescription: formatModelDescription(variable.evaluateName || variable.name, variable.value, variable.type)
425
427
  };
426
428
  }
427
429
  return undefined;