@codingame/monaco-vscode-debug-service-override 2.2.2 → 3.1.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/debug.js +1 -0
- package/package.json +2 -2
- package/tools/debugAssets.js +4 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +180 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +112 -50
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +7 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +14 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +2 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +5 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +19 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +18 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +33 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +130 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +28 -20
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +3 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +48 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +11 -24
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +64 -0
|
@@ -27,16 +27,16 @@ import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/te
|
|
|
27
27
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
28
28
|
import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
29
29
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
30
|
-
import { AbstractExpressionsRenderer, renderVariable, renderViewTree } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
30
|
+
import { AbstractExpressionsRenderer, renderExpressionValue, renderVariable, renderViewTree, AbstractExpressionDataSource } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
31
31
|
import { LinkDetector } from './linkDetector.js';
|
|
32
32
|
import { IDebugService, VARIABLES_VIEW_ID, CONTEXT_VARIABLES_FOCUSED, CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED, CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
33
33
|
import { getContextForVariable } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugContext';
|
|
34
|
-
import { Variable, getUriForDebugMemory, Expression, ErrorScope, Scope, StackFrame } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
34
|
+
import { VisualizedExpression, Variable, getUriForDebugMemory, Expression, ErrorScope, Scope, StackFrame } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
35
35
|
import { IDebugVisualizerService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugVisualizers';
|
|
36
36
|
import { IEditorService, SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
37
37
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
38
38
|
|
|
39
|
-
var VariablesRenderer_1;
|
|
39
|
+
var VisualizedVariableRenderer_1, VariablesRenderer_1;
|
|
40
40
|
const $ = $$1;
|
|
41
41
|
let forgetScopes = true;
|
|
42
42
|
let variableInternalContext;
|
|
@@ -75,8 +75,13 @@ let VariablesView = class VariablesView extends ViewPane {
|
|
|
75
75
|
this.element.classList.add('debug-pane');
|
|
76
76
|
container.classList.add('debug-variables');
|
|
77
77
|
const treeContainer = renderViewTree(container);
|
|
78
|
-
const
|
|
79
|
-
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, ( new VariablesDelegate()), [
|
|
78
|
+
const linkDetector = this.instantiationService.createInstance(LinkDetector);
|
|
79
|
+
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, ( new VariablesDelegate()), [
|
|
80
|
+
this.instantiationService.createInstance(VariablesRenderer, linkDetector),
|
|
81
|
+
this.instantiationService.createInstance(VisualizedVariableRenderer, linkDetector),
|
|
82
|
+
( new ScopesRenderer()),
|
|
83
|
+
( new ScopeErrorRenderer()),
|
|
84
|
+
], this.instantiationService.createInstance(VariablesDataSource), {
|
|
80
85
|
accessibilityProvider: ( new VariablesAccessibilityProvider()),
|
|
81
86
|
identityProvider: { getId: (element) => element.getId() },
|
|
82
87
|
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e) => e.name },
|
|
@@ -84,6 +89,7 @@ let VariablesView = class VariablesView extends ViewPane {
|
|
|
84
89
|
listBackground: this.getBackgroundColor()
|
|
85
90
|
}
|
|
86
91
|
});
|
|
92
|
+
this._register(VisualizedVariableRenderer.rendererOnVisualizationRange(this.debugService.getViewModel(), this.tree));
|
|
87
93
|
this.tree.setInput(this.debugService.getViewModel().focusedStackFrame ?? null);
|
|
88
94
|
CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService);
|
|
89
95
|
this._register(this.debugService.getViewModel().onDidFocusStackFrame(sf => {
|
|
@@ -113,7 +119,7 @@ let VariablesView = class VariablesView extends ViewPane {
|
|
|
113
119
|
let horizontalScrolling;
|
|
114
120
|
this._register(this.debugService.getViewModel().onDidSelectExpression(e => {
|
|
115
121
|
const variable = e?.expression;
|
|
116
|
-
if (variable
|
|
122
|
+
if (variable && this.tree.hasNode(variable)) {
|
|
117
123
|
horizontalScrolling = this.tree.options.horizontalScrolling;
|
|
118
124
|
if (horizontalScrolling) {
|
|
119
125
|
this.tree.updateOptions({ horizontalScrolling: false });
|
|
@@ -148,11 +154,20 @@ let VariablesView = class VariablesView extends ViewPane {
|
|
|
148
154
|
this.tree.collapseAll();
|
|
149
155
|
}
|
|
150
156
|
onMouseDblClick(e) {
|
|
151
|
-
|
|
152
|
-
if (session && e.element instanceof Variable && session.capabilities.supportsSetVariable && !e.element.presentationHint?.attributes?.includes('readOnly') && !e.element.presentationHint?.lazy) {
|
|
157
|
+
if (this.canSetExpressionValue(e.element)) {
|
|
153
158
|
this.debugService.getViewModel().setSelectedExpression(e.element, false);
|
|
154
159
|
}
|
|
155
160
|
}
|
|
161
|
+
canSetExpressionValue(e) {
|
|
162
|
+
const session = this.debugService.getViewModel().focusedSession;
|
|
163
|
+
if (!session) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
if (e instanceof VisualizedExpression) {
|
|
167
|
+
return !!e.treeItem.canEdit;
|
|
168
|
+
}
|
|
169
|
+
return e instanceof Variable && !e.presentationHint?.attributes?.includes('readOnly') && !e.presentationHint?.lazy;
|
|
170
|
+
}
|
|
156
171
|
async onContextMenu(e) {
|
|
157
172
|
const variable = e.element;
|
|
158
173
|
if (!(variable instanceof Variable) || !variable.value) {
|
|
@@ -238,7 +253,7 @@ function getContextForVariableMenuBase(parentContext, variable, additionalContex
|
|
|
238
253
|
function isStackFrame(obj) {
|
|
239
254
|
return obj instanceof StackFrame;
|
|
240
255
|
}
|
|
241
|
-
class VariablesDataSource {
|
|
256
|
+
class VariablesDataSource extends AbstractExpressionDataSource {
|
|
242
257
|
hasChildren(element) {
|
|
243
258
|
if (!element) {
|
|
244
259
|
return false;
|
|
@@ -248,7 +263,7 @@ class VariablesDataSource {
|
|
|
248
263
|
}
|
|
249
264
|
return element.hasChildren;
|
|
250
265
|
}
|
|
251
|
-
|
|
266
|
+
doGetChildren(element) {
|
|
252
267
|
if (isStackFrame(element)) {
|
|
253
268
|
return element.getScopes();
|
|
254
269
|
}
|
|
@@ -266,6 +281,9 @@ class VariablesDelegate {
|
|
|
266
281
|
if (element instanceof Scope) {
|
|
267
282
|
return ScopesRenderer.ID;
|
|
268
283
|
}
|
|
284
|
+
if (element instanceof VisualizedExpression) {
|
|
285
|
+
return VisualizedVariableRenderer.ID;
|
|
286
|
+
}
|
|
269
287
|
return VariablesRenderer.ID;
|
|
270
288
|
}
|
|
271
289
|
}
|
|
@@ -301,6 +319,96 @@ class ScopeErrorRenderer {
|
|
|
301
319
|
disposeTemplate() {
|
|
302
320
|
}
|
|
303
321
|
}
|
|
322
|
+
let VisualizedVariableRenderer = class VisualizedVariableRenderer extends AbstractExpressionsRenderer {
|
|
323
|
+
static { VisualizedVariableRenderer_1 = this; }
|
|
324
|
+
static { this.ID = 'viz'; }
|
|
325
|
+
static rendererOnVisualizationRange(model, tree) {
|
|
326
|
+
return model.onDidChangeVisualization(({ original }) => {
|
|
327
|
+
if (!tree.hasNode(original)) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const parent = tree.getParentElement(original);
|
|
331
|
+
tree.updateChildren(parent, false, false);
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
constructor(linkDetector, debugService, contextViewService, menuService, contextKeyService) {
|
|
335
|
+
super(debugService, contextViewService);
|
|
336
|
+
this.linkDetector = linkDetector;
|
|
337
|
+
this.menuService = menuService;
|
|
338
|
+
this.contextKeyService = contextKeyService;
|
|
339
|
+
}
|
|
340
|
+
get templateId() {
|
|
341
|
+
return VisualizedVariableRenderer_1.ID;
|
|
342
|
+
}
|
|
343
|
+
renderElement(node, index, data) {
|
|
344
|
+
super.renderExpressionElement(node.element, node, data);
|
|
345
|
+
}
|
|
346
|
+
renderExpression(expression, data, highlights) {
|
|
347
|
+
const viz = expression;
|
|
348
|
+
let text = viz.name;
|
|
349
|
+
if (viz.value && typeof viz.name === 'string') {
|
|
350
|
+
text += ':';
|
|
351
|
+
}
|
|
352
|
+
data.label.set(text, highlights, viz.name);
|
|
353
|
+
renderExpressionValue(viz, data.value, {
|
|
354
|
+
showChanged: false,
|
|
355
|
+
maxValueLength: 1024,
|
|
356
|
+
showHover: true,
|
|
357
|
+
colorize: true,
|
|
358
|
+
linkDetector: this.linkDetector
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
getInputBoxOptions(expression) {
|
|
362
|
+
const viz = expression;
|
|
363
|
+
return {
|
|
364
|
+
initialValue: expression.value,
|
|
365
|
+
ariaLabel: ( localizeWithPath(
|
|
366
|
+
'vs/workbench/contrib/debug/browser/variablesView',
|
|
367
|
+
'variableValueAriaLabel',
|
|
368
|
+
"Type new variable value"
|
|
369
|
+
)),
|
|
370
|
+
validationOptions: {
|
|
371
|
+
validation: () => viz.errorMessage ? ({ content: viz.errorMessage }) : null
|
|
372
|
+
},
|
|
373
|
+
onFinish: (value, success) => {
|
|
374
|
+
viz.errorMessage = undefined;
|
|
375
|
+
if (success) {
|
|
376
|
+
viz.edit(value).then(() => {
|
|
377
|
+
forgetScopes = false;
|
|
378
|
+
this.debugService.getViewModel().updateViews();
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
renderActionBar(actionBar, expression, _data) {
|
|
385
|
+
const viz = expression;
|
|
386
|
+
const contextKeyService = viz.original ? getContextForVariableMenuBase(this.contextKeyService, viz.original) : this.contextKeyService;
|
|
387
|
+
const menu = this.menuService.createMenu(MenuId.DebugVariablesContext, contextKeyService);
|
|
388
|
+
const primary = [];
|
|
389
|
+
const context = viz.original ? getVariablesContext(viz.original) : undefined;
|
|
390
|
+
createAndFillInContextMenuActions(menu, { arg: context, shouldForwardArgs: false }, { primary, secondary: [] }, 'inline');
|
|
391
|
+
if (viz.original) {
|
|
392
|
+
const action = ( new Action('debugViz', ( localizeWithPath(
|
|
393
|
+
'vs/workbench/contrib/debug/browser/variablesView',
|
|
394
|
+
'removeVisualizer',
|
|
395
|
+
'Remove Visualizer'
|
|
396
|
+
)), ThemeIcon.asClassName(Codicon.eye), true, () => this.debugService.getViewModel().setVisualizedExpression(viz.original, undefined)));
|
|
397
|
+
action.checked = true;
|
|
398
|
+
primary.push(action);
|
|
399
|
+
actionBar.domNode.style.display = 'initial';
|
|
400
|
+
}
|
|
401
|
+
actionBar.clear();
|
|
402
|
+
actionBar.context = context;
|
|
403
|
+
actionBar.push(primary, { icon: true, label: false });
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
VisualizedVariableRenderer = VisualizedVariableRenderer_1 = ( __decorate([
|
|
407
|
+
( __param(1, IDebugService)),
|
|
408
|
+
( __param(2, IContextViewService)),
|
|
409
|
+
( __param(3, IMenuService)),
|
|
410
|
+
( __param(4, IContextKeyService))
|
|
411
|
+
], VisualizedVariableRenderer));
|
|
304
412
|
let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRenderer {
|
|
305
413
|
static { VariablesRenderer_1 = this; }
|
|
306
414
|
static { this.ID = 'variable'; }
|
|
@@ -360,12 +468,13 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
|
|
|
360
468
|
data.elementDisposable.add(toDisposable(() => cts.dispose(true)));
|
|
361
469
|
this.visualization.getApplicableFor(expression, cts.token).then(result => {
|
|
362
470
|
data.elementDisposable.add(result);
|
|
471
|
+
const originalExpression = (expression instanceof VisualizedExpression && expression.original) || expression;
|
|
363
472
|
const actions = ( result.object.map(v => ( new Action(
|
|
364
473
|
'debugViz',
|
|
365
474
|
v.name,
|
|
366
475
|
v.iconClass || 'debug-viz-icon',
|
|
367
476
|
undefined,
|
|
368
|
-
this.useVisualizer(v, cts.token)
|
|
477
|
+
this.useVisualizer(v, originalExpression, cts.token)
|
|
369
478
|
))));
|
|
370
479
|
if (actions.length === 0) ;
|
|
371
480
|
else if (actions.length === 1) {
|
|
@@ -376,7 +485,7 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
|
|
|
376
485
|
'vs/workbench/contrib/debug/browser/variablesView',
|
|
377
486
|
'useVisualizer',
|
|
378
487
|
'Visualize Variable...'
|
|
379
|
-
)), ThemeIcon.asClassName(Codicon.eye), undefined, () => this.pickVisualizer(actions,
|
|
488
|
+
)), ThemeIcon.asClassName(Codicon.eye), undefined, () => this.pickVisualizer(actions, originalExpression, data))), { icon: true, label: false });
|
|
380
489
|
}
|
|
381
490
|
});
|
|
382
491
|
}
|
|
@@ -386,7 +495,7 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
|
|
|
386
495
|
getActions: () => actions,
|
|
387
496
|
});
|
|
388
497
|
}
|
|
389
|
-
useVisualizer(viz, token) {
|
|
498
|
+
useVisualizer(viz, expression, token) {
|
|
390
499
|
return async () => {
|
|
391
500
|
const resolved = await viz.resolve(token);
|
|
392
501
|
if (token.isCancellationRequested) {
|
|
@@ -396,7 +505,10 @@ let VariablesRenderer = class VariablesRenderer extends AbstractExpressionsRende
|
|
|
396
505
|
viz.execute();
|
|
397
506
|
}
|
|
398
507
|
else {
|
|
399
|
-
|
|
508
|
+
const replacement = await this.visualization.getVisualizedNodeFor(resolved.id, expression);
|
|
509
|
+
if (replacement) {
|
|
510
|
+
this.debugService.getViewModel().setVisualizedExpression(expression, replacement);
|
|
511
|
+
}
|
|
400
512
|
}
|
|
401
513
|
};
|
|
402
514
|
}
|
|
@@ -584,7 +696,7 @@ CommandsRegistry.registerCommand({
|
|
|
584
696
|
handler: async (accessor) => {
|
|
585
697
|
const debugService = accessor.get(IDebugService);
|
|
586
698
|
if (dataBreakpointInfoResponse) {
|
|
587
|
-
await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'write');
|
|
699
|
+
await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'write', undefined);
|
|
588
700
|
}
|
|
589
701
|
}
|
|
590
702
|
});
|
|
@@ -594,7 +706,7 @@ CommandsRegistry.registerCommand({
|
|
|
594
706
|
handler: async (accessor) => {
|
|
595
707
|
const debugService = accessor.get(IDebugService);
|
|
596
708
|
if (dataBreakpointInfoResponse) {
|
|
597
|
-
await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'readWrite');
|
|
709
|
+
await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'readWrite', undefined);
|
|
598
710
|
}
|
|
599
711
|
}
|
|
600
712
|
});
|
|
@@ -604,7 +716,7 @@ CommandsRegistry.registerCommand({
|
|
|
604
716
|
handler: async (accessor) => {
|
|
605
717
|
const debugService = accessor.get(IDebugService);
|
|
606
718
|
if (dataBreakpointInfoResponse) {
|
|
607
|
-
await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'read');
|
|
719
|
+
await debugService.addDataBreakpoint(dataBreakpointInfoResponse.description, dataBreakpointInfoResponse.dataId, !!dataBreakpointInfoResponse.canPersist, dataBreakpointInfoResponse.accessTypes, 'read', undefined);
|
|
608
720
|
}
|
|
609
721
|
}
|
|
610
722
|
});
|
|
@@ -648,4 +760,4 @@ registerAction2(class extends ViewAction {
|
|
|
648
760
|
}
|
|
649
761
|
});
|
|
650
762
|
|
|
651
|
-
export { ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, BREAK_WHEN_VALUE_IS_READ_ID, COPY_EVALUATE_PATH_ID, COPY_VALUE_ID, SET_VARIABLE_ID, VIEW_MEMORY_ID, VariablesRenderer, VariablesView, openContextMenuForVariableTreeElement };
|
|
763
|
+
export { ADD_TO_WATCH_ID, BREAK_WHEN_VALUE_CHANGES_ID, BREAK_WHEN_VALUE_IS_ACCESSED_ID, BREAK_WHEN_VALUE_IS_READ_ID, COPY_EVALUATE_PATH_ID, COPY_VALUE_ID, SET_VARIABLE_ID, VIEW_MEMORY_ID, VariablesRenderer, VariablesView, VisualizedVariableRenderer, openContextMenuForVariableTreeElement };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { ElementsDragAndDropData } from 'vscode/vscode/vs/base/browser/ui/list/listView';
|
|
2
3
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
4
|
+
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
5
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
6
|
+
import { createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
7
|
+
import { MenuId, registerAction2, Action2, IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
8
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
9
|
+
import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
10
|
import { IContextMenuService, IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView';
|
|
6
11
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
12
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding';
|
|
8
|
-
import { AbstractExpressionsRenderer, renderExpressionValue, renderViewTree } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
9
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
10
|
-
import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
11
13
|
import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
12
|
-
import { ElementsDragAndDropData } from 'vscode/vscode/vs/base/browser/ui/list/listView';
|
|
13
|
-
import { VariablesRenderer } from './variablesView.js';
|
|
14
|
-
import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
15
|
-
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
16
14
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener';
|
|
17
|
-
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
18
15
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
16
|
+
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
17
|
+
import { ViewAction, ViewPane } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
18
|
+
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views';
|
|
19
|
+
import { AbstractExpressionsRenderer, renderExpressionValue, renderViewTree, AbstractExpressionDataSource } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
19
20
|
import { watchExpressionsAdd, watchExpressionsRemoveAll } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
20
|
-
import { MenuId, registerAction2, Action2, IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
21
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
22
|
-
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
23
|
-
import { createAndFillInContextMenuActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
24
21
|
import { LinkDetector } from './linkDetector.js';
|
|
22
|
+
import { VariablesRenderer, VisualizedVariableRenderer } from './variablesView.js';
|
|
23
|
+
import { CONTEXT_CAN_VIEW_MEMORY, CONTEXT_WATCH_ITEM_TYPE, WATCH_VIEW_ID, CONTEXT_WATCH_EXPRESSIONS_EXIST, IDebugService, CONTEXT_VARIABLE_IS_READONLY, CONTEXT_WATCH_EXPRESSIONS_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
24
|
+
import { Variable, Expression, VisualizedExpression } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
25
25
|
|
|
26
26
|
var WatchExpressionsRenderer_1;
|
|
27
27
|
const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
|
@@ -49,8 +49,12 @@ let WatchExpressionsView = class WatchExpressionsView extends ViewPane {
|
|
|
49
49
|
container.classList.add('debug-watch');
|
|
50
50
|
const treeContainer = renderViewTree(container);
|
|
51
51
|
const expressionsRenderer = this.instantiationService.createInstance(WatchExpressionsRenderer);
|
|
52
|
-
const
|
|
53
|
-
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'WatchExpressions', treeContainer, ( new WatchExpressionsDelegate()), [
|
|
52
|
+
const linkDetector = this.instantiationService.createInstance(LinkDetector);
|
|
53
|
+
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'WatchExpressions', treeContainer, ( new WatchExpressionsDelegate()), [
|
|
54
|
+
expressionsRenderer,
|
|
55
|
+
this.instantiationService.createInstance(VariablesRenderer, linkDetector),
|
|
56
|
+
this.instantiationService.createInstance(VisualizedVariableRenderer, linkDetector),
|
|
57
|
+
], this.instantiationService.createInstance(WatchExpressionsDataSource), {
|
|
54
58
|
accessibilityProvider: ( new WatchExpressionsAccessibilityProvider()),
|
|
55
59
|
identityProvider: { getId: (element) => element.getId() },
|
|
56
60
|
keyboardNavigationLabelProvider: {
|
|
@@ -68,6 +72,7 @@ let WatchExpressionsView = class WatchExpressionsView extends ViewPane {
|
|
|
68
72
|
});
|
|
69
73
|
this.tree.setInput(this.debugService);
|
|
70
74
|
CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService);
|
|
75
|
+
this._register(VisualizedVariableRenderer.rendererOnVisualizationRange(this.debugService.getViewModel(), this.tree));
|
|
71
76
|
this._register(this.tree.onContextMenu(e => this.onContextMenu(e)));
|
|
72
77
|
this._register(this.tree.onMouseDblClick(e => this.onMouseDblClick(e)));
|
|
73
78
|
this._register(this.debugService.getModel().onDidChangeWatchExpressions(async (we) => {
|
|
@@ -108,7 +113,7 @@ let WatchExpressionsView = class WatchExpressionsView extends ViewPane {
|
|
|
108
113
|
let horizontalScrolling;
|
|
109
114
|
this._register(this.debugService.getViewModel().onDidSelectExpression(e => {
|
|
110
115
|
const expression = e?.expression;
|
|
111
|
-
if (expression
|
|
116
|
+
if (expression && this.tree.hasElement(expression)) {
|
|
112
117
|
horizontalScrolling = this.tree.options.horizontalScrolling;
|
|
113
118
|
if (horizontalScrolling) {
|
|
114
119
|
this.tree.updateOptions({ horizontalScrolling: false });
|
|
@@ -146,7 +151,7 @@ let WatchExpressionsView = class WatchExpressionsView extends ViewPane {
|
|
|
146
151
|
}
|
|
147
152
|
const element = e.element;
|
|
148
153
|
const selectedExpression = this.debugService.getViewModel().getSelectedExpression();
|
|
149
|
-
if (element instanceof Expression && element !== selectedExpression?.expression) {
|
|
154
|
+
if ((element instanceof Expression && element !== selectedExpression?.expression) || (element instanceof VisualizedExpression && element.treeItem.canEdit)) {
|
|
150
155
|
this.debugService.getViewModel().setSelectedExpression(element, false);
|
|
151
156
|
}
|
|
152
157
|
else if (!element) {
|
|
@@ -189,17 +194,20 @@ class WatchExpressionsDelegate {
|
|
|
189
194
|
if (element instanceof Expression) {
|
|
190
195
|
return WatchExpressionsRenderer.ID;
|
|
191
196
|
}
|
|
197
|
+
if (element instanceof VisualizedExpression) {
|
|
198
|
+
return VisualizedVariableRenderer.ID;
|
|
199
|
+
}
|
|
192
200
|
return VariablesRenderer.ID;
|
|
193
201
|
}
|
|
194
202
|
}
|
|
195
203
|
function isDebugService(element) {
|
|
196
204
|
return typeof element.getConfigurationManager === 'function';
|
|
197
205
|
}
|
|
198
|
-
class WatchExpressionsDataSource {
|
|
206
|
+
class WatchExpressionsDataSource extends AbstractExpressionDataSource {
|
|
199
207
|
hasChildren(element) {
|
|
200
208
|
return isDebugService(element) || element.hasChildren;
|
|
201
209
|
}
|
|
202
|
-
|
|
210
|
+
doGetChildren(element) {
|
|
203
211
|
if (isDebugService(element)) {
|
|
204
212
|
const debugService = element;
|
|
205
213
|
const watchExpressions = debugService.getModel().getWatchExpressions();
|
|
@@ -141,8 +141,9 @@ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
|
|
|
141
141
|
content: ( localizeWithPath('vs/workbench/contrib/debug/browser/welcomeView', {
|
|
142
142
|
key: 'customizeRunAndDebugOpenFolder',
|
|
143
143
|
comment: [
|
|
144
|
-
'Please do not translate the word "
|
|
145
|
-
'
|
|
144
|
+
'Please do not translate the word "command", it is part of our internal syntax which must not change',
|
|
145
|
+
'Please do not translate "launch.json", it is the specific configuration file name',
|
|
146
|
+
'{Locked="](command:{0})"}',
|
|
146
147
|
]
|
|
147
148
|
}, "To customize Run and Debug, [open a folder](command:{0}) and create a launch.json file.", (isMacintosh && !isWeb) ? OpenFileFolderAction.ID : OpenFolderAction.ID)),
|
|
148
149
|
when: ( ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, ( WorkbenchStateContext.isEqualTo('empty')))),
|
|
@@ -2,8 +2,12 @@ import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensio
|
|
|
2
2
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { launchSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
|
|
4
4
|
import { inputsSchema } from 'vscode/vscode/vs/workbench/services/configurationResolver/common/configurationResolverSchema';
|
|
5
|
+
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { Extensions } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionFeatures';
|
|
7
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
8
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
5
9
|
|
|
6
|
-
const debuggersExtPoint =
|
|
10
|
+
const debuggersExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
7
11
|
extensionPoint: 'debuggers',
|
|
8
12
|
defaultExtensionKind: ['workspace'],
|
|
9
13
|
jsonSchema: {
|
|
@@ -209,8 +213,8 @@ const debuggersExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
209
213
|
}
|
|
210
214
|
}
|
|
211
215
|
}
|
|
212
|
-
})
|
|
213
|
-
const breakpointsExtPoint =
|
|
216
|
+
});
|
|
217
|
+
const breakpointsExtPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
214
218
|
extensionPoint: 'breakpoints',
|
|
215
219
|
jsonSchema: {
|
|
216
220
|
description: ( localizeWithPath(
|
|
@@ -245,7 +249,7 @@ const breakpointsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
251
|
}
|
|
248
|
-
})
|
|
252
|
+
});
|
|
249
253
|
const presentationSchema = {
|
|
250
254
|
type: 'object',
|
|
251
255
|
description: ( localizeWithPath(
|
|
@@ -412,5 +416,45 @@ const launchSchema = {
|
|
|
412
416
|
inputs: inputsSchema.definitions.inputs
|
|
413
417
|
}
|
|
414
418
|
};
|
|
419
|
+
class DebuggersDataRenderer extends Disposable {
|
|
420
|
+
constructor() {
|
|
421
|
+
super(...arguments);
|
|
422
|
+
this.type = 'table';
|
|
423
|
+
}
|
|
424
|
+
shouldRender(manifest) {
|
|
425
|
+
return !!manifest.contributes?.debuggers;
|
|
426
|
+
}
|
|
427
|
+
render(manifest) {
|
|
428
|
+
const contrib = manifest.contributes?.debuggers || [];
|
|
429
|
+
if (!contrib.length) {
|
|
430
|
+
return { data: { headers: [], rows: [] }, dispose: () => { } };
|
|
431
|
+
}
|
|
432
|
+
const headers = [
|
|
433
|
+
( localizeWithPath('vs/workbench/contrib/debug/common/debugSchemas', 'debugger name', "Name")),
|
|
434
|
+
( localizeWithPath('vs/workbench/contrib/debug/common/debugSchemas', 'debugger type', "Type")),
|
|
435
|
+
];
|
|
436
|
+
const rows = ( contrib.map(d => {
|
|
437
|
+
return [
|
|
438
|
+
d.label ?? '',
|
|
439
|
+
d.type
|
|
440
|
+
];
|
|
441
|
+
}));
|
|
442
|
+
return {
|
|
443
|
+
data: {
|
|
444
|
+
headers,
|
|
445
|
+
rows
|
|
446
|
+
},
|
|
447
|
+
dispose: () => { }
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
|
|
452
|
+
id: 'debuggers',
|
|
453
|
+
label: ( localizeWithPath('vs/workbench/contrib/debug/common/debugSchemas', 'debuggers', "Debuggers")),
|
|
454
|
+
access: {
|
|
455
|
+
canToggle: false
|
|
456
|
+
},
|
|
457
|
+
renderer: ( new SyncDescriptor(DebuggersDataRenderer)),
|
|
458
|
+
});
|
|
415
459
|
|
|
416
460
|
export { breakpointsExtPoint, debuggersExtPoint, launchSchema, presentationSchema };
|
|
@@ -54,7 +54,14 @@ let DebugStorage = class DebugStorage extends Disposable {
|
|
|
54
54
|
let result;
|
|
55
55
|
try {
|
|
56
56
|
result = ( JSON.parse(this.storageService.get(DEBUG_BREAKPOINTS_KEY, 1 , '[]')).map((breakpoint) => {
|
|
57
|
-
|
|
57
|
+
breakpoint.uri = URI.revive(breakpoint.uri);
|
|
58
|
+
return ( new Breakpoint(
|
|
59
|
+
breakpoint,
|
|
60
|
+
this.textFileService,
|
|
61
|
+
this.uriIdentityService,
|
|
62
|
+
this.logService,
|
|
63
|
+
breakpoint.id
|
|
64
|
+
));
|
|
58
65
|
}));
|
|
59
66
|
}
|
|
60
67
|
catch (e) { }
|
|
@@ -64,7 +71,7 @@ let DebugStorage = class DebugStorage extends Disposable {
|
|
|
64
71
|
let result;
|
|
65
72
|
try {
|
|
66
73
|
result = ( JSON.parse(this.storageService.get(DEBUG_FUNCTION_BREAKPOINTS_KEY, 1 , '[]')).map((fb) => {
|
|
67
|
-
return ( new FunctionBreakpoint(fb
|
|
74
|
+
return ( new FunctionBreakpoint(fb, fb.id));
|
|
68
75
|
}));
|
|
69
76
|
}
|
|
70
77
|
catch (e) { }
|
|
@@ -74,16 +81,7 @@ let DebugStorage = class DebugStorage extends Disposable {
|
|
|
74
81
|
let result;
|
|
75
82
|
try {
|
|
76
83
|
result = ( JSON.parse(this.storageService.get(DEBUG_EXCEPTION_BREAKPOINTS_KEY, 1 , '[]')).map((exBreakpoint) => {
|
|
77
|
-
return ( new ExceptionBreakpoint(
|
|
78
|
-
exBreakpoint.filter,
|
|
79
|
-
exBreakpoint.label,
|
|
80
|
-
exBreakpoint.enabled,
|
|
81
|
-
exBreakpoint.supportsCondition,
|
|
82
|
-
exBreakpoint.condition,
|
|
83
|
-
exBreakpoint.description,
|
|
84
|
-
exBreakpoint.conditionDescription,
|
|
85
|
-
!!exBreakpoint.fallback
|
|
86
|
-
));
|
|
84
|
+
return ( new ExceptionBreakpoint(exBreakpoint, exBreakpoint.id));
|
|
87
85
|
}));
|
|
88
86
|
}
|
|
89
87
|
catch (e) { }
|
|
@@ -93,18 +91,7 @@ let DebugStorage = class DebugStorage extends Disposable {
|
|
|
93
91
|
let result;
|
|
94
92
|
try {
|
|
95
93
|
result = ( JSON.parse(this.storageService.get(DEBUG_DATA_BREAKPOINTS_KEY, 1 , '[]')).map((dbp) => {
|
|
96
|
-
return ( new DataBreakpoint(
|
|
97
|
-
dbp.description,
|
|
98
|
-
dbp.dataId,
|
|
99
|
-
true,
|
|
100
|
-
dbp.enabled,
|
|
101
|
-
dbp.hitCondition,
|
|
102
|
-
dbp.condition,
|
|
103
|
-
dbp.logMessage,
|
|
104
|
-
dbp.accessTypes,
|
|
105
|
-
dbp.accessType,
|
|
106
|
-
dbp.id
|
|
107
|
-
));
|
|
94
|
+
return ( new DataBreakpoint(dbp, dbp.id));
|
|
108
95
|
}));
|
|
109
96
|
}
|
|
110
97
|
catch (e) { }
|
|
@@ -12,6 +12,9 @@ class ViewModel {
|
|
|
12
12
|
this._onDidSelectExpression = ( new Emitter());
|
|
13
13
|
this._onDidEvaluateLazyExpression = ( new Emitter());
|
|
14
14
|
this._onWillUpdateViews = ( new Emitter());
|
|
15
|
+
this._onDidChangeVisualization = ( new Emitter());
|
|
16
|
+
this.visualized = ( new WeakMap());
|
|
17
|
+
this.preferredVisualizers = ( new Map());
|
|
15
18
|
contextKeyService.bufferChangeEvents(() => {
|
|
16
19
|
this.expressionSelectedContextKey = CONTEXT_EXPRESSION_SELECTED.bindTo(contextKeyService);
|
|
17
20
|
this.loadedScriptsSupportedContextKey = CONTEXT_LOADED_SCRIPTS_SUPPORTED.bindTo(contextKeyService);
|
|
@@ -84,6 +87,9 @@ class ViewModel {
|
|
|
84
87
|
get onDidFocusStackFrame() {
|
|
85
88
|
return this._onDidFocusStackFrame.event;
|
|
86
89
|
}
|
|
90
|
+
get onDidChangeVisualization() {
|
|
91
|
+
return this._onDidChangeVisualization.event;
|
|
92
|
+
}
|
|
87
93
|
getSelectedExpression() {
|
|
88
94
|
return this.selectedExpression;
|
|
89
95
|
}
|
|
@@ -110,10 +116,33 @@ class ViewModel {
|
|
|
110
116
|
setMultiSessionView(isMultiSessionView) {
|
|
111
117
|
this.multiSessionDebug.set(isMultiSessionView);
|
|
112
118
|
}
|
|
119
|
+
setVisualizedExpression(original, visualized) {
|
|
120
|
+
const current = this.visualized.get(original) || original;
|
|
121
|
+
const key = this.getPreferredVisualizedKey(original);
|
|
122
|
+
if (visualized) {
|
|
123
|
+
this.visualized.set(original, visualized);
|
|
124
|
+
this.preferredVisualizers.set(key, visualized.treeId);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
this.visualized.delete(original);
|
|
128
|
+
this.preferredVisualizers.delete(key);
|
|
129
|
+
}
|
|
130
|
+
this._onDidChangeVisualization.fire({ original: current, replacement: visualized || original });
|
|
131
|
+
}
|
|
132
|
+
getVisualizedExpression(expression) {
|
|
133
|
+
return this.visualized.get(expression) || this.preferredVisualizers.get(this.getPreferredVisualizedKey(expression));
|
|
134
|
+
}
|
|
113
135
|
async evaluateLazyExpression(expression) {
|
|
114
136
|
await expression.evaluateLazy();
|
|
115
137
|
this._onDidEvaluateLazyExpression.fire(expression);
|
|
116
138
|
}
|
|
139
|
+
getPreferredVisualizedKey(expr) {
|
|
140
|
+
return JSON.stringify([
|
|
141
|
+
expr.name,
|
|
142
|
+
expr.type,
|
|
143
|
+
!!expr.memoryReference,
|
|
144
|
+
].join('\0'));
|
|
145
|
+
}
|
|
117
146
|
}
|
|
118
147
|
|
|
119
148
|
export { ViewModel };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
2
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
3
|
+
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
4
|
+
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
|
+
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService';
|
|
6
|
+
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService';
|
|
7
|
+
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
|
|
8
|
+
|
|
9
|
+
const COPY_NOTEBOOK_VARIABLE_VALUE_ID = 'workbench.debug.viewlet.action.copyWorkspaceVariableValue';
|
|
10
|
+
const COPY_NOTEBOOK_VARIABLE_VALUE_LABEL = ( localizeWithPath(
|
|
11
|
+
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands',
|
|
12
|
+
'copyWorkspaceVariableValue',
|
|
13
|
+
"Copy Value"
|
|
14
|
+
));
|
|
15
|
+
registerAction2(class extends Action2 {
|
|
16
|
+
constructor() {
|
|
17
|
+
super({
|
|
18
|
+
id: COPY_NOTEBOOK_VARIABLE_VALUE_ID,
|
|
19
|
+
title: COPY_NOTEBOOK_VARIABLE_VALUE_LABEL,
|
|
20
|
+
f1: false,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
run(accessor, context) {
|
|
24
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
25
|
+
if (context.value) {
|
|
26
|
+
clipboardService.writeText(context.value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
registerAction2(class extends Action2 {
|
|
31
|
+
constructor() {
|
|
32
|
+
super({
|
|
33
|
+
id: '_executeNotebookVariableProvider',
|
|
34
|
+
title: ( localizeWithPath(
|
|
35
|
+
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands',
|
|
36
|
+
'executeNotebookVariableProvider',
|
|
37
|
+
"Execute Notebook Variable Provider"
|
|
38
|
+
)),
|
|
39
|
+
f1: false,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async run(accessor, resource) {
|
|
43
|
+
if (!resource) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
const uri = URI.revive(resource);
|
|
47
|
+
const notebookKernelService = accessor.get(INotebookKernelService);
|
|
48
|
+
const notebookService = accessor.get(INotebookService);
|
|
49
|
+
const notebookTextModel = notebookService.getNotebookTextModel(uri);
|
|
50
|
+
if (!notebookTextModel) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
const selectedKernel = notebookKernelService.getMatchingKernel(notebookTextModel).selected;
|
|
54
|
+
if (selectedKernel && selectedKernel.hasVariableProvider) {
|
|
55
|
+
const variables = selectedKernel.provideVariables(notebookTextModel.uri, undefined, 'named', 0, CancellationToken.None);
|
|
56
|
+
return await ( variables
|
|
57
|
+
.map(variable => { return variable; }))
|
|
58
|
+
.toPromise();
|
|
59
|
+
}
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export { COPY_NOTEBOOK_VARIABLE_VALUE_ID, COPY_NOTEBOOK_VARIABLE_VALUE_LABEL };
|