From c3e22c0e0c0f0cfebbb529ffd8b12b0a630508c1 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 2 Feb 2017 11:29:12 +0100 Subject: [PATCH] debug: allow set value on structured variables fixes #19494 --- .../parts/debug/electron-browser/debugViewer.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 28c797cca5e..92ea70d554c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -623,15 +623,13 @@ export class VariablesActionProvider implements IActionProvider { } public getSecondaryActions(tree: ITree, element: any): TPromise { - let actions: IAction[] = []; + const actions: IAction[] = []; const variable = element; - if (!variable.hasChildren) { - actions.push(this.instantiationService.createInstance(SetValueAction, SetValueAction.ID, SetValueAction.LABEL, variable)); - actions.push(this.instantiationService.createInstance(CopyValueAction, CopyValueAction.ID, CopyValueAction.LABEL, variable)); - actions.push(new Separator()); - } - + actions.push(this.instantiationService.createInstance(SetValueAction, SetValueAction.ID, SetValueAction.LABEL, variable)); + actions.push(this.instantiationService.createInstance(CopyValueAction, CopyValueAction.ID, CopyValueAction.LABEL, variable)); + actions.push(new Separator()); actions.push(this.instantiationService.createInstance(AddToWatchExpressionsAction, AddToWatchExpressionsAction.ID, AddToWatchExpressionsAction.LABEL, variable)); + return TPromise.as(actions); } @@ -782,7 +780,7 @@ export class VariablesController extends BaseDebugController { protected onRename(tree: ITree, event: IKeyboardEvent): boolean { const element = tree.getFocus(); - if (element instanceof Variable && !element.hasChildren) { + if (element instanceof Variable) { this.debugService.getViewModel().setSelectedExpression(element); return true; }