Visual Studio忽略try catch-仅调试 [英] Visual Studio ignore try catch - debug only

查看:451
本文介绍了Visual Studio忽略try catch-仅调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为错误处理是一个好主意。 :)调试时可能会妨碍您-尤其是使用友好的用户友好消息时。在VB6中,我可以仅选中一个复选框以使编译器忽略我的错误处理。我 找到了 对话框,该对话框使我可以在VS中执行类似的操作,但是该对话框大约是10,000个而不是一个复选框-每次我要进行生产编译时都无法更改。

I think error handling is a good idea. :) When debugging it can get in the way - especially with nice user friendly messages. In VB6 I could just check a box for the compiler to ignore my error handling. I found the dialog that allows me to do something similar in VS, but it's about 10,000 check boxes instead of one - which is too many to change every time I want a production compilation.

是否可以设置VS,所以当我处于调试模式时,我会得到一组条件,而当我在生产中时,我会得到另一个条件? ...或者还有另一种方法来更有效地处理错误和调试吗?

Is there a way to set VS up so when I am in debugging mode I get one set of conditions and when I am in production I get another? ...or is there just another method to handling errors and debugging more efficiently?

谢谢

推荐答案

尝试使用调试菜单并查看异常。您可以将其设置为在引发异常时自动中断。

Try the Debug Menu and look at Exceptions. You can set it to automatically break when an exception is thrown.

这篇关于Visual Studio忽略try catch-仅调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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