Reputation: 11808
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.
Upvotes: 7
Views: 9053
Reputation: 139187
It's loaded first time from the Registry here (and after that persisted in the solution):
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio[VS version]\Configuration\AD7Metrics\Exception{449EC4CC-30D2-4032-9256-EE18EB41B62B}\Common Language Runtime Exceptions\[namespace]\[exception type name]
[VS Version] can be 9.0 or 10.0 or any other hive (like 9.0Exp if your running in VS 2008 SDK experimental hive)
[namespace] can be for example System and [exception type name] System.AppDomainUnloadedException.
Then you must setup the State key value (make it consistent with other existing exceptions configuration).
Upvotes: 3
Reputation: 118895
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.)
Upvotes: 4