如何使视觉工作室仅在未处理的异常上中断? [英] How to make visual studio break only on unhandled exceptions?

查看:13
本文介绍了如何使视觉工作室仅在未处理的异常上中断?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的其他机器上,Visual Studio 总是在没有 try/catch 处理错误时中断,但如果有 try/catch 则不会中断.

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.

出于某种原因,在这台笔记本电脑上,它不能那样工作.一开始它根本没有中断,但后来我发现如何通过调试/异常将其设置为中断.但是,将其配置为在此处中断会导致它始终在出现异常时中断,即使存在 try/catch 块也是如此.

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?

推荐答案

通过进入 Tools-->Options-->Debugger-->General--确保你有 Just My Code Enabled> 启用仅我的代码.这将更改您的 Debug--> Exceptions 对话框以显示用户未处理错误的 CheckBox.

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.

这篇关于如何使视觉工作室仅在未处理的异常上中断?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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