How to make VS stop on first chance exceptions

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.
 
A

Academia

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
 
P

Peter Macej

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.
 
A

Academia

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?
 
K

kimiraikkonen

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.
 
A

Academia

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top