vscode-statusbar-debugger icon indicating copy to clipboard operation
vscode-statusbar-debugger copied to clipboard

Disable buttons for unavailable actions

Open vfonic opened this issue 5 years ago • 5 comments

In the "old" toolbar, I could clearly see which buttons/actions are enabled/available. It's more difficult to say here. For example, I don't know if my debugger is paused currently or not.

PS I think having the demo gif closer to the top of README would be better.

Thanks!

vfonic avatar May 12 '19 05:05 vfonic

Not possible until they expose that state https://github.com/microsoft/vscode/issues/30810.

fabiospampinato avatar May 12 '19 13:05 fabiospampinato

@fabiospampinato since you're more familiar with the VS Code extension APIs I wanted to ask you before I do it, can we run querySelector and/or MutationObserver on the DOM? In that case we can grab state from the action bar. Kinda of a hacky workaround but good enough until Microsoft releases an actual API.

DimitarNestorov avatar Sep 26 '19 13:09 DimitarNestorov

No we can't access the DOM at all.

fabiospampinato avatar Sep 26 '19 13:09 fabiospampinato

Maybe the state of the debugger can actually be inspected now. For future reference: https://github.com/hediet/vscode-debug-visualizer/blob/db1e5a8086bab5a8d4b65f0255be5372ae3e6a35/extension/src/debugger/VsCodeDebugger.ts#L84

fabiospampinato avatar Apr 02 '21 21:04 fabiospampinato

It looks like now there is a debugState context key, which will hold the value 'stopped' when the debugger is stopped. Problem is there seems to still be no way to programmatically read the value of context keys...

fabiospampinato avatar Mar 10 '24 22:03 fabiospampinato