Change:
return; } <del> const toDispose = new DisposableStore(); </del> <ins> return openContextMenuForVariableTreeElement(this.contextKeyService, this.menuService, this.contextMenuService, MenuId.DebugVariablesContext, e); } } </ins> <del> try { const contextKeyService = await getContextForVariableMenuWithDataAccess(this.contextKeyService, variable); const menu = toDispose.add(this.menuService.createMenu(MenuId.DebugVariablesContext, contextKeyService)); const context: IVariablesContext = getVariablesContext(variable); const secondary: IAction[] = []; createAndFillInContextMenuActions(menu, { arg: context, shouldForwardArgs: false }, { primary: [], secondary }, 'inline'); this.contextMenuService.showContextMenu({ getAnchor: () => e.anchor, getActions: () => secondary }); } finally { toDispose.dispose(); } </del> <ins> export async function openContextMenuForVariableTreeElement(parentContextKeyService: IContextKeyService, menuService: IMenuService, contextMenuService: IContextMenuService, menuId: MenuId, e: ITreeContextMenuEvent<IExpression | IScope>) { const variable = e.element; if (!(variable instanceof Variable) || !variable.value) { return; } const toDispose = new DisposableStore(); try { const contextKeyService = await getContextForVariableMenuWithDataAccess(parentContextKeyService, variable); const menu = toDispose.add(menuService.createMenu(menuId, contextKeyService)); const context: IVariablesContext = getVariablesContext(variable); const secondary: IAction[] = []; createAndFillInContextMenuActions(menu, { arg: context, shouldForwardArgs: false }, { primary: [], secondary }, 'inline'); contextMenuService.showContextMenu({ getAnchor: () => e.anchor, getActions: () => secondary }); } finally { toDispose.dispose(); </ins> } }

Discussion:
This is the debug hover: ! I think it would be great if each value has a context menu (or inline buttons) to trigger (contributable) actions. Built-in actions could be: copy value copy expression watch Actions contributed by extensions could be: visualize This is already supported in the sidebar: !
good overall idea and I like it. I think we could implement it fairly easily by adding a new menu type to the hover tree. We can even open it for extensions as you suggested. However I would be interested in what other apps do you know that have a context menu on the hover? Might this be a sort of an anti pattern? I know that the debug hover is a bit heavy and a context menu might fit well there, but I would be interested in how other products do it. Maybe try out Visual Studio, Chrome Dev Tools and others... fyi
I do believe that's using the tree widget, which supports inline actions: <img width="334" alt="CleanShot 2021-06-08 at 10 46 42 src="https://user-"I'd assume either a (though there is quite a bit already in these views) or: <img width="652" alt="CleanShot 2021-06-08 at 10 48 01 src="https://user-"<img width="659" alt="CleanShot 2021-06-08 at 10 48 46 src="https://user-"
VS has quite a few nested context menus :D 
I think that would be possible since it's a toolbar, we do show more inline actions in peek/diff views: <img width="157" alt="CleanShot 2021-06-08 at 10 57 38 src="https://user-"
Cool ideas. Maybe just a right click context menu might work best. But an additional gear on the end to make it discoverable will help. Ellipsis look good in the example you provided but in practice we have a lost of overflowing text and it is all shown with ellipsis, so I think it would be very confusing, as some ellipsis would be clickable and some not... is right, it can be made possible if we make it a toolbar, however I would be worried about opening inline actions to extensions since horizontal space is already limited. I would first only open secondary actions - the one behind a context menu. Though I am flexible.
can you verify this one?