vscode-statusbar-debugger
vscode-statusbar-debugger copied to clipboard
Disable buttons for unavailable actions
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!
Not possible until they expose that state https://github.com/microsoft/vscode/issues/30810.
@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.
No we can't access the DOM at all.
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
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...