How to make visual studio break only on unhandled exceptions?

笑着哭i 提交于 2019-12-17 07:29:03

问题


On my other machines Visual Studio always broke on errors when there was not a try/catch to handle them, but if there was a try/catch then it didn't break. For some reason on this laptop it doesn't work that way. It didn't break at all at first, but then I found out how to set it to break by going to debug/exceptions. However, configuring it to break there causes it to always break on exceptions even if there is a try/catch block.

How do I make it work like I'm used to??


回答1:


Make sure you have Just My Code Enabled by going into Tools-->Options-->Debugger-->General--> Enable Just My Code. This will change your Debug--> Exceptions Dialog Box to show a CheckBox for User-unhandled Errors.



来源:https://stackoverflow.com/questions/11183099/how-to-make-visual-studio-break-only-on-unhandled-exceptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!