-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Allow customisation of debug toolbar (eg. additional buttons) #45116
Comments
This is a fair feature request. So we would need to introduce a new menu id for the debug toolbar. For example A nice thing about this is that we would be able to remove the chakra actions which do not really belong in the vscode core imho. |
@isidorn Sorry, but there are no "chakra actions". The debug protocol supports reverse-back and reverse-continue and VS Code surfaces that in the UI. VS Code does not know anything about chakra (and the comment is wrong). Any debug extension can use that. So there is no way that we ever remove support for this. |
Reverse continue?! That sounds bizzare!
I was actually thinking this would work by sending a |
@DanTup We are investigating this is the Dec/Jan milestone. |
@weinand Ok cool, I'll hang fire doing anything until it's clear if this may happen - thanks for the info! |
@weinand Is there any news on this? If it's unlikely to happen, I might go ahead with adding a setting to control it instead. Thanks! |
@DanTup we started investigating this but nothing will ship in the Dec/Jan milestone. |
@weinand Thanks. I somewhat expected that, but do you think it might come soon? It's not urgent so if it's still likely to come, I'll hold off. If it may be some way off (or might not come) then it's more worthwhile me adding a setting. Thanks! |
Now the debug toolbar is customizable, extensions can add new items to it. The menu id of the debug toolbar is We strongly recommend to use the when Here's how my sample extension adds an action to the toolbar. "contributes": {
"commands": [
{
"command": "extension.closeAll",
"title": "Close All Editors in Group",
"icon": {
"light": "media/closeall.svg",
"dark": "media/closeall_inverse.svg"
}
}
],
"menus": {
"debug/toolbar": [
{
"command": "extension.closeAll",
"group": "navigation",
"when": "debugType == node2"
}
]
}
} |
Note to self: we shuold update contribution points docs. |
Awesome! I'm not sure how well it'll work prior to being able to put our new button next to the existing restart button, but I'm really excited this is coming - thanks!! By the way - does this affect the touch bar at all? Currently there are debug buttons shown there - ideally when we insert a new "hot restart" button to the debug toolbar, it'd be nice to have it inserted into the same position in the touch bar too for consistency (I did try inserting buttons in between in the touch bar previously, but the separators disappeared and everything merged into one big button, so I'm not sure if it's supposed to work). |
This does not affect the touch bar. |
In Flutter (a framework for developing mobile apps) we have two different types of restart during debugging:
Since stateful hot reload is awesome, we've wired that up to the Restart button on the toolbar. In the case where this fails (eg. because you modified something that makes your state invalid) we have a status bar notification and an action in the command palette for a "Full Restart".
This has been a little confusing for users - they expect to see buttons for "Hot Reload" and "Restart" on the toolbar.
It would be great if we could supply an icon/tooltip for additional buttons (and a way of positioning them between existing buttons) and have it run a custom command.
The text was updated successfully, but these errors were encountered: