In Visual Studio Debug mode, I wish to always, until I retire:
- for Unhandled exceptions, see the pop-up window with exception information. For every type of exception in existence, whether I've ever heard of it or not.
- for Handled exceptions, not see anything, and not be given any hint that any exception occurred. For every type of exception in existence, whether I've ever heard of it or not.
An Answer to this question would never have the word 'exception' without being preceded with either of these words: 'unhandled' or 'handled'. There is not a single exception of any kind that I always want to see. And there is not a single exception, whether I've heard of it or not, that I never want to see. I want to see them all every time they are not in a Try/Catch block. And I never want to see a single one raised in a Try/Catch block.
I'm being extra clear because every time I see this question, on StackOverflow or elsewhere, people answer as if the question is about behavior based on the type of exception. If you have information how to handle exceptions based on the type of exception, please do not share it here. I've never cared in 27 years of doing this, and I don't think I ever will. Apparently some folks care about that; good for them.
In the last few years, VS periodically, maddeningly, breaks on handled exceptions. And sometimes, maddeningly, does not break on unhandled exceptions (an MSTest, run in debug mode, doesn't break in code but just finishes and fails. I can tell from the stacktrace where the exception occurred, but I'd much prefer for it to break of course.) Up until recently, Visual Studio behaved as I wished 100% of the time, going back to 1999: it broke in the code when the exception was not handled, and did not break when the exception was handled. I'm trying desperately to get back to that!
(This concerns managed code, by the way, C#, not C++. This is in testing code, though I would never want different behavior depending on whether I was in unit tests or not.)