Vscode: Visibility of Debug Viewlet (for "when" contexts)

Created on 8 Jan 2018  ·  3Comments  ·  Source: microsoft/vscode

There is not currently a way to detect the visibility (or focus) of the "Debug Viewlet" like there is for the Search and Explorer Viewlets.
[searchViewletVisible, searchInputBoxFocus, explorerViewletVisible, explorerViewletFocus]

My use-case for this is to allow intelligent toggling of the sidebar viewlets (roughly like https://github.com/Microsoft/vscode/issues/41186), although I suspect there are other uses for the visibility and focus when clause contexts.

My requested names would be debugViewletVisible and debugViewletFocus.

debug feature-request

Most helpful comment

sidebarVisible does not allow for a way to detect _which_ sidebar is visible. If the Explorer Viewlet is open, sidebarVisible is true. If the Debug Viewlet is open, sidebarVisible is true. The purpose of this feature request is a way to determine specifically that the Debug Viewlet is open (to perform a different action).

In my desired use case, pressing Cmd+Shift+D when the Debug Viewlet is not both visible and focused would be to cause it to become both visible and focused (showing and focusing it if it was invisible, focusing it if it was unfocused). Pressing Cmd+Shift+D when the Debug Viewlet is visible and focused would hide the sidebar.

Of note: I am not requesting that this keyboard shortcut (or even the toggling functionality) be added. The feature request is simply that the contexts be available to do this (like in Explorer and Search).

All 3 comments

Please use this context sidebarVisible

sidebarVisible does not allow for a way to detect _which_ sidebar is visible. If the Explorer Viewlet is open, sidebarVisible is true. If the Debug Viewlet is open, sidebarVisible is true. The purpose of this feature request is a way to determine specifically that the Debug Viewlet is open (to perform a different action).

In my desired use case, pressing Cmd+Shift+D when the Debug Viewlet is not both visible and focused would be to cause it to become both visible and focused (showing and focusing it if it was invisible, focusing it if it was unfocused). Pressing Cmd+Shift+D when the Debug Viewlet is visible and focused would hide the sidebar.

Of note: I am not requesting that this keyboard shortcut (or even the toggling functionality) be added. The feature request is simply that the contexts be available to do this (like in Explorer and Search).

Use activeViewlet=debug

Was this page helpful?
0 / 5 - 0 ratings