5

I frequently use Debug -> Exceptions -> check CLR Exceptions during debugging sessions. Sometimes, an exception gets thrown and handled, but I really want to find the source of the exception. In order to do this without seeing first-chance exceptions that I don't care about, I start my app, and then check CLR Exceptions:

enter image description here

This gets really tedious, and I'd love to have a toggle button in my VS2010 toolbar that allows me to only set/reset CLR Exceptions at will, without having to key in CTRL+D, E, check the box, and then click OK (and then do the same process again to turn off the exceptions). I went into the toolbar customization, but all I could get was a button that bring up the Exceptions dialog. This is obviously less efficient than hitting CTRL+D, E.

Does anyone know of another way to add this? Will it require a VS addin? A keystroke mapping would be nice as well.

I've never used the Macro Recorder in VS ever, but maybe this is one place where it's necessary?

Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
Dave
  • 14,618
  • 13
  • 91
  • 145
  • Regarding your PS. Short answer is: Any Long answer: http://meta.stackexchange.com/questions/70356/key-stroke-combination-markdown – Cristian Diaconescu Jun 16 '11 at 12:17
  • I edited your question to use the tag, as an excuse for myself to use it :) Also, check this for some fun with : http://meta.stackexchange.com/questions/1939/kbd-elements-are-way-intrusive/1974#1974 – Cristian Diaconescu Jun 16 '11 at 12:51
  • @Cristi thanks! hopefully, I won't forget that tag the next time. :) – Dave Jun 16 '11 at 12:53

1 Answers1

0

Yes. Use the macro recorder to record the steps.

Rename the macro to something mnemonic.

go to (tools)(customize)

at the bottom there is a keyboard button you can use to map that macro to a key or

the commands tab will allow you to (add command) to any specific menu or tool bar.

EvilTeach
  • 28,120
  • 21
  • 85
  • 141
  • I'll give it a shot. That macro recorder gets on my nerves because I bring it up by accident all of the time, and then I can't figure out why my IDE isn't doing anything. :) – Dave Apr 13 '11 at 20:25
  • I was looking for the same productivity hack as OP (for VS 2008, but shouldn't matter...). I tried the macro recorder, but all it does is bring up the 'Exceptions' dialog. This is the complete source of the recorded macro: Sub StopOnFirstChanceExceptions() DTE.ExecuteCommand("Debug.Exceptions") End Sub – Cristian Diaconescu Jun 16 '11 at 12:08