@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.
- package/package.json +2 -2
- package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +41 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +379 -255
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +606 -325
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +132 -91
- package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +105 -103
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +258 -147
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +163 -121
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +92 -41
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +68 -39
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +290 -214
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +409 -260
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +14 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +19 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +126 -100
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +160 -89
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +87 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +270 -181
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +79 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +149 -113
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css +24 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +201 -189
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +28 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +10 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +66 -86
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +24 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +177 -138
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +55 -33
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +8 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +23 -19
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +9 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +156 -133
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +81 -52
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +22 -14
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +46 -30
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +74 -52
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +11 -10
- 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
|
|
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 =
|
|
34
|
-
this.label = ( localize(
|
|
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(
|
|
46
|
-
const query = observableValue(
|
|
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(
|
|
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 {
|
|
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(
|
|
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
|
|
103
|
-
}
|
|
104
|
+
return "noop";
|
|
105
|
+
}
|
|
104
106
|
});
|
|
105
107
|
const watches = this.debugService.getModel().getWatchExpressions();
|
|
106
108
|
if (watches.length > 0) {
|
|
107
|
-
picks.push({
|
|
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({
|
|
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(
|
|
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(
|
|
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 {
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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,
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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:
|
|
215
|
+
description: ( localize(7031, "No result")),
|
|
219
216
|
disabled: true,
|
|
220
|
-
asAttachment: () =>
|
|
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:
|
|
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:
|
|
249
|
-
value: {
|
|
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:
|
|
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(
|
|
265
|
+
const variablesSummary = ( variables.map(v => `${v.name}: ${v.value}`)).join("\n");
|
|
263
266
|
return {
|
|
264
|
-
kind:
|
|
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:
|
|
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 {
|
|
301
|
+
static {
|
|
302
|
+
this.ID = "workbench.contrib.chat.debugChatContextContribution";
|
|
303
|
+
}
|
|
299
304
|
constructor(contextPickService, instantiationService) {
|
|
300
305
|
super();
|
|
301
|
-
this._register(
|
|
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:
|
|
312
|
-
title: ( localize(
|
|
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:
|
|
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:
|
|
343
|
-
title: ( localize(
|
|
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:
|
|
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:
|
|
371
|
-
title: ( localize(
|
|
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:
|
|
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 ===
|
|
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:
|
|
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;
|