简体   繁体   English

Visual Studio 2012不会在调试模式下异常停止

[英]Visual Studio 2012 not stopping at exception in debug mode

First off, i've looked at similar issues posted and they all seem to involve a 64 bit windows bug. 首先,我查看了类似的问题,它们似乎都涉及64位Windows错误。 I'm running 32 bit though, on a local machine. 我正在本地计算机上运行32位。 The application is a asp.net website with links to a number of libraries all contained inside the project solution. 该应用程序是一个asp.net网站,具有指向许多都包含在项目解决方案中的库的链接。

I'm mainly trying to understand why visual studio would just pass by this exception during debug mode. 我主要是想了解为什么Visual Studio在调试模式下只会通过此异常。 I believe it's getting generated in the CLR level, because when I enable throwing at the CLR level then VS will stop and display the error. 我相信它是在CLR级别生成的,因为当我在CLR级别启用抛出时,VS将停止并显示错误。 But it won't let me step through the code to get to that error. 但这不会让我单步执行代码来解决该错误。 It's like a black box. 就像一个黑匣子。 I'm breaking at the last known line of my code before the error happens. 在发生错误之前,我在代码的最后已知行中断了代码。 I hit F11 once more and the code leaves the last line of my method and VS hangs while the application window displays: 我再次按下F11键,代码离开方法的最后一行,并且在应用程序窗口显示时VS挂起:

在此处输入图片说明

Nothing pops up in VS. VS中没有任何内容。 As if it's not in debug mode. 好像它不在调试模式下。 When i enable throwing at the CLR level VS errors out sooner saying privileges to access this code is denied. 当我启用CLR级别的VS错误时,很快就会说拒绝访问此代码的特权。

How does one intelligently go about debugging an issue like this? 如何智能地调试这样的问题?

Thanks, 谢谢,

If this is Web Application (vs web site) - check your project properties to produce full debug information 如果这是Web应用程序(相对于网站),请检查项目属性以产生完整的调试信息

+ +

Menu Debug -> exceptions -> Common Language Runtime Exceptions set to "thrown" 菜单Debug-> exceptions-> Common Language Runtime Exceptions设置为“ throw”

    + +

check in Options -> Debugging -> General 检入选项->调试->常规

uncheck "Enable Just My Code" 取消选中“启用我的代码”

+ +

"delete Assembly cache" from C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\Temporary ASP.NET Files -- you may simply run a different version of dll 从C:\\ Windows \\ Microsoft.NET \\ Framework \\ v2.0.50727 \\ Temporary ASP.NET文件“删除程序集缓存”-您可以运行其他版本的dll

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM