gpt4 book ai didi

c# - 调试器不会因错误而停止

转载 作者:太空狗 更新时间:2023-10-29 22:23:12 26 4
gpt4 key购买 nike

我正在使用 Visual Studio 2012 开发 Asp.net MVC4 项目。

当调试过程中出现错误时,它通常会因错误而停止。

但是突然,调试器并没有停止,只是吐出如下错误信息网页。

Server Error in '/' Application.

The given key was not present in the dictionary.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Source Error: ...

Stack Trace: ...

如何设置调试器在出现错误时停止?

最佳答案

我遇到了同样的问题,甚至我的调试选项都与@John Koerner 相同。我发现并不是所有的异常类型都默认启用打破解决方案。您可以从异常(exception)设置窗口中选择启用哪些。

VS2015:调试 -> Windows -> 异常设置。

VS2012:调试 -> 异常 more details

我启用了整个 CLR 异常集。

关于c# - 调试器不会因错误而停止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14307330/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com