Visual Studio Exception Settings
Visual Studio breaks on handled exceptions. I've looked at more than like 20 stackoverflow questions but none of them really helped.
VS will stop on a simple code like that.
As for my settings, I have
Just My Code
option enabled.
Some people on SO suggested that we should go to Exception Settings
menu and enable Continue when unhandled in user code
but this makes no sense, I want it to break on unhandled code but continue as it should on handled code. I'm really not sure why this simple feature is so hard to get it working, so I'd really appreciate any help.8 Replies
You need to uncheck the exception type in Exception Settings
If you uncheck all CLR exceptions it won't break on first chance.
Only on second chance (i.e., unhandled.)
So for instance this only breaks on the second call
thats the problem, if I just uncheck them it wont break on unhandled exceptions, im not sure why
Does this trivial test program break for you or not?
You should see the 'Exception Unhandled' box as in my screenshot.
In your case there might be an exception handler higher up the stack that is catching it.
A true unhandled exception crashes the program.
So you should definitely see that dialog.
yeah youre right i think i have some kind of global handler that just catches all exceptions, i its a big project that i havent touched in years, ill have to take a look at that
okay yeah it seems like its a handler from a library that i use which redirects everything somewhere else. i feel dumb for not considering that thank you very much 😅
how to upgrade visual studio 2017 to 2022
i have 2022 in my other laptop but in this machine i have windows 10 and vs 2017 version