Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable buttons for unavailable actions #15

Open
vfonic opened this issue May 12, 2019 · 5 comments
Open

Disable buttons for unavailable actions #15

vfonic opened this issue May 12, 2019 · 5 comments

Comments

@vfonic
Copy link

vfonic commented May 12, 2019

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!

@fabiospampinato
Copy link
Owner

Not possible until they expose that state microsoft/vscode#30810.

@fabiospampinato fabiospampinato changed the title Possible to hide/disable buttons that are not available? Hide/disable unavailable buttons May 12, 2019
@DimitarNestorov
Copy link

@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.

@fabiospampinato
Copy link
Owner

No we can't access the DOM at all.

@fabiospampinato
Copy link
Owner

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
Copy link
Owner

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 fabiospampinato changed the title Hide/disable unavailable buttons Disable buttons for unavailable actions Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants