I have an application that throws many (handled) exceptions. There is one type of exception in particular that I would like to break on.
Is it possible to make the debugger break on a specific user-defined exception? I don't see why this wouldn't be possible, since it does know the type of the exception that was thrown.
I can work around this by setting a breakpoint in the exception's constructor, but it would be nice to know how to do it the 'correct' way.
Try
Debug menu > Exceptions > Add
Yes, just use the
__debugbreak
functionIf you go to the
Debug
menu and chooseExceptions...
(or pressCtrl+Alt+E
), you'll get a dialog:You'll need to click the
Add...
button, enter your custom type name, and make sure that the checkbox by your new exception type is selected.