How to make VS stop on first chance exceptions

  • Thread starter Thread starter Academia
  • Start date Start date
A

Academia

I see the following in my "Output" pane when I run my program.

A first chance exception of type 'System.NullReferenceException' occurred in
....

I believe there is a way to configure VS so that it will stop on such
exceptions but can not find it.

Can you tell me how to set that?



Do you know what "first chance exception" means?



Thanks

I'm guessing some property is being set by Designer generated code that
should only be set at run time.
 
I right-clicked and unselected "Exception Messages"

Now I worry that unhandled exceptions will go unnoticed.

Will the debugger still stop on unhandled exceptions?


Thanks
 
Will the debugger still stop on unhandled exceptions?

Yes, unless you haven't disabled unhandled exceptions under
Debug-Exceptions menu. Now you have only disabled exception messages in
output window. Exception assistant will still pop-up for unhandled
exceptions.
 
Peter Macej said:
Yes, unless you haven't disabled unhandled exceptions under
Debug-Exceptions menu.


Are you refering to the top level (or items in) "Common Language Runtime
Exceptions" in the Debug-Exceptions menu?


Thanks for all the help


ps I think you meant "have disabled" didn't you?
 
I right-clicked and unselected "Exception Messages"

Now I worry that unhandled exceptions will go unnoticed.

Will the debugger still stop on unhandled exceptions?

Thanks

Set "try-catch-finally "blocks for the critical execution areas where
you suspect, thus you can catch an unhandled exception when it occurs.
 
kimiraikkonen said:
Set "try-catch-finally "blocks for the critical execution areas where
you suspect, thus you can catch an unhandled exception when it occurs.

thanks
 
Back
Top