如何设置Visual Studio显示堆栈跟踪的第一次机会异常?

编程入门 行业动态 更新时间:2024-10-19 20:42:04
本文介绍了如何设置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显示堆栈跟踪的第一次机会异常?

本文发布于:2023-06-03 12:18:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/473787.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:堆栈   如何设置   异常   机会   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!