Adding a Button to the Debug Toolbar in Visual Studio
Here’s how you can add a button to the Debug toolbar in VS:
Attach to a process or run a project so that your solution is in “Running” mode
I’ll attach to devenv.exe (and make sure that I have selected “Managed (v4.5, v4.0) code” as the code type that I want to attach to, otherwise some of the debugging commands won’t apply).
Find the Debug Toolbar (depending on your VS settings, this toolbar might not show up, that’s ok, you can add any button to any toolbar)
Hit the drop down arrow at the right side of the toolbar and select “Add or Remove Buttons” >> “Customize”
On the Customize window press “Add Command…”
Select the Category and Command that you are looking for then hit “OK”
Hit the “Close” button on the Customize window
The new button will now be in the toolbar
In this case, the new button is disabled, because I haven’t broke execution yet. After hitting the “Break All” button…
…it becomes enabled
Comments
- Anonymous
September 20, 2013
Thanks, that's helpful. Any chance you know of a way to add a macro that will allow quick toggling of breaking or not breaking when CLR exceptions are thrown? That's something I constantly find myself turning on and off, and it consists of these steps:
- Debug -> Exceptions...
- Check/uncheck checkbox in Exceptions dialog
- Hit OK Just thought I'd ask.
- Anonymous
January 08, 2014
Thanks Glenn, I agree that sounds very useful. I was thinking about this and searched today and found an extension that sounds like it does just this. I am going to try it today. visualstudiogallery.msdn.microsoft.com/50091e25-9e75-40d3-9780-a05892f474de