When debugging using Visual Studio 2012 RC with break on exception turned on, Visual Studio breaks on exceptions from within the .NET Framework. How do I make it break on exceptions only in my code?
When debugging a ASP.NET MVC 4 project there are a lot of framework exceptions thrown on every page hit. The following exception happens a lot:
System.Globalization.CultureNotFoundException occurred
HResult=-2147024809
Message=Culture is not supported.
Parameter name: name
UserCache is an invalid culture identifier.
Source=mscorlib
ParamName=name
InvalidCultureName=UserCache
StackTrace:
at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
InnerException:
This exception is coming from within mscorlib.dll which I do not not want Visual Studio to break on.
It looks like I am missing a column in the exceptions window. I only see the “Thrown” column and “User-Unhandled” is missing. This might be my issue.
I believe all you need to do is go to
Debug -> Options -> Debugging and check Enable Just My Code (Managed Only)