如何设置Visual Studio显示堆栈跟踪的第一次机会异常? [英] How can I set Visual Studio to show a stack trace for first chance exceptions?

查看:169
本文介绍了如何设置Visual Studio显示堆栈跟踪的第一次机会异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,它只显示:


类型为System.ArgumentException的第一次机会异常发生在Microsoft.Stubs.VsPackage .dll

A first chance exception of type 'System.ArgumentException' occurred in Microsoft.Stubs.VsPackage.dll

有没有办法可以让它包含一个部分堆栈跟踪与异常消息,而不必打破调试器?

Is there a way I can get it to include a partial stack trace with the exception message without having to break into the debugger?

推荐答案

您是否在输出窗口或异常助理中看到此消息?

Are you seeing this message in the output window or in the exception assistant?

异常助手是一个显示异常信息的小工具提示样式窗口。如果是例外,您可以点击查看详细信息按钮并打开属性网格。其中一个属性将是堆栈跟踪。

The exception assistant is a little tooltip style window which displays the exception information. If it's the exception assitant you can click on the "View Detail" button and bring up a property grid. One of the properties will be the Stack Trace.

如果是构建窗口,我恐怕没有办法打印出堆栈跟踪信息,例外。您只能选择启用第一次机会异常中断,并手动检查该值。

If it's the build window I'm afraid there is no way to have it print out the stack trace information with the exception. You're only option is to enable break on first chance exceptions and manually inspect the value.

这篇关于如何设置Visual Studio显示堆栈跟踪的第一次机会异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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