如何允许在VS2010打破“System.NullReferenceException”? [英] How do I allow breaking on 'System.NullReferenceException' in VS2010?

查看:501
本文介绍了如何允许在VS2010打破“System.NullReferenceException”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VS 2010 C#.NET 4项目。该问题是调试过程中程序不上破'的NullReferenceException'错误

I have a VS 2010 C# .NET 4 project. The issue is that the program is not breaking on 'NullReferenceException' errors during debugging.

输出窗口将显示以下内容:

The output window will display the following:

键入'System.NullReferenceException'的第一次机会异常出现在myProgram.exe

。 ..但调试器将只出口了功能并继续运行该程序的其余部分。

...but the debugger will just exit out of the function and continue running the rest of the program.

我要如何改变这种行为,以便调试器将这些破?例外

How do I change this behavior so that the debugger will break on these exceptions?

推荐答案

进入调试 - >例外 - >搜索的NullReferenceException 并勾选抛出复选框。

Go to Debug -> Exceptions -> Search for NullReferenceException and check the "thrown" checkbox.

这篇关于如何允许在VS2010打破“System.NullReferenceException”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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