Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn on exception handling in visual studio 2010 by default for all projects

It seems that visual studio 2010 does not break on thrown exceptions by default for new projects - you have to go into the settings and turn that behavior on. This setting seems to be a per-project setting, rather than a system-wide one.

Is there any way to force the default behavior to be to break on thrown exceptions for all new projects?

I am running Visual Studio 2010 Ultimate, on windows 7 Professional, on a 64 bit machine.

like image 835
Thomi Avatar asked Nov 30 '10 20:11

Thomi


People also ask

How do I enable exception handling in Visual Studio?

With a solution open in Visual Studio, use Debug > Windows > Exception Settings to open the Exception Settings window. Provide handlers that respond to the most important exceptions.

How do I reset Visual Studio exceptions?

To set Visual Studio debugger options, select Tools > Options, and under Debugging select or deselect the boxes next to the General options. You can restore all default settings with Tools > Import and Export Settings > Reset all settings.

How do I fix unhandled exception in Visual Studio?

In Visual Studio, when exceptions are thrown or end up unhandled, the debugger can help you debug these by breaking just like it breaks when a breakpoint is hit.

How do I skip an exception in Visual Studio?

In visual studio, the Debug menu -> Exceptions. You can check and uncheck exceptions. You can have it break on handled thrown ones, or unhandled ones.


1 Answers

Assuming you mean the Debug\Exceptions... menu dialog to catch all first chance exceptions, this is global/system-wide.

(Note that like many global settings, I think its value is saved when VS shuts down, and so beware if you have multiple instances of VS open with different values for this setting.)

like image 198
Brian Avatar answered Nov 19 '22 09:11

Brian