Visual Studio 2012 RC打破了.NET Framework中的异常。如何使它仅在代码中的异常情况下中断? [英] Visual Studio 2012 RC breaks on exceptions from within the .NET Framework. How do I make it break on exceptions only in my code?

查看:103
本文介绍了Visual Studio 2012 RC打破了.NET Framework中的异常。如何使它仅在代码中的异常情况下中断?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用Visual Studio 2012 RC进行调试且启用了异常中断功能时,Visual Studio会在.NET Framework中中断异常。

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?

调试ASP.NET MVC 4项目时,每次点击页面都会抛出很多框架异常。以下异常经常发生:

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: 

此异常来自mscorlib.dll,我不希望Visual Studio这样做

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.

推荐答案

我相信您要做的就是去

调试->选项->调试并检查仅启用我的代码(仅托管)

Debug -> Options -> Debugging and check Enable Just My Code (Managed Only)

这篇关于Visual Studio 2012 RC打破了.NET Framework中的异常。如何使它仅在代码中的异常情况下中断?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆