VS 2008的插件暂时禁用/删除所有catch块插件、VS、catch

2023-09-04 02:13:10 作者:养猪仙人

有任何插件,通过它我可以暂时停用所有catch块。我维护一个应用程序,我需要找出究竟是抛出异常。有人做了错误处理,做的是所有层,以使我的工作艰难:(

Is there any addon by which I can disable all catch blocks temporarily. I'm maintaining an application and I need to find out where exactly it is throwing exception. Someone has done error handling is done is all layers to make my job tough :(

推荐答案

我不知道一个方法来禁用catch块,但你要实现的目标可以轻松完成的异常对话框中选择VS什么:

I don't know a way to disable catch blocks but what you are trying to achieve can be done easily a VS option in exceptions dialog:

Debug -> Exceptions -> CLR Exceptions -> Check the "Thrown" checkbox.

这样的话,VS会立即打破异常时正在运行的任何catch块之前抛出。

This way, VS will break immediately when an exception is being thrown before running any catch block.