You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extension API - How to determine debug state #10077
Yes there is a "when": "inDebugMode", however not sure if we surface when in our api or if we want to add that.
Thus forwarding to Johannes Rieken (@jrieken)
It would be a nice feature actually (if it's not already possible)
So one could add special behavior for certain actions.
Like, if my file changes and vscode is actually in debugging mode (or in a debugging session) I'd run the command workspace.debug.restart (just as an example, I know the actual command does have another name)
The when clause is not the right vehicle for this because it's just a condition under which commands are constraint by default. However, a user can always change things like a keybinding and skip/change the when clause as she/he likes.
What you want is debugging API like a vscode.debugger-namespace which have we not yet planned to do.
Yeah such a namespace would be nice to determine the state of vscode.
Something like vscode.debugger.isDebugging() maybe?
I would like to suggest this feature then 😄
IMO it could be very beneficial for some extensions to add features and / or behaviors based on the state of VSCode.
For now, I just can execute the command for restarting the debugger and see if there's an error.
Activity
isidorn commentedon Aug 3, 2016
Yes there is a
"when": "inDebugMode", however not sure if we surfacewhenin our api or if we want to add that.Thus forwarding to Johannes Rieken (@jrieken)
buehler commentedon Aug 3, 2016
It would be a nice feature actually (if it's not already possible)
So one could add special behavior for certain actions.
Like, if my file changes and vscode is actually in debugging mode (or in a debugging session) I'd run the command
workspace.debug.restart(just as an example, I know the actual command does have another name)jrieken commentedon Aug 4, 2016
The
whenclause is not the right vehicle for this because it's just a condition under which commands are constraint by default. However, a user can always change things like a keybinding and skip/change thewhenclause as she/he likes.What you want is debugging API like a
vscode.debugger-namespace which have we not yet planned to do.buehler commentedon Aug 4, 2016
Yeah such a namespace would be nice to determine the state of vscode.
Something like
vscode.debugger.isDebugging()maybe?I would like to suggest this feature then 😄
IMO it could be very beneficial for some extensions to add features and / or behaviors based on the state of VSCode.
For now, I just can execute the command for restarting the debugger and see if there's an error.
jrieken commentedon Nov 17, 2017
There is now debug api that allows you to do this. Please try it out and provide in detail feedback. Thanks