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.
In this article When the debugger breaks, it shows you where the exception was thrown. You can also add or delete exceptions. With a solution open in Visual Studio, use Debug > Windows > Exception Settings to open the Exception Settings window.
In Visual Studio, you can use Exception Settings Window to manage the exceptions – for which exception to break, at which point to break, to add or deleting exceptions. The Exception Settings windows for Visual Studio is there for quite some time.
I believe all you need to do is go to
Debug -> Options -> Debugging and check Enable Just My Code (Managed Only)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With