如何打印 StackOverflowException 的堆栈跟踪

发布于 2024-08-28 03:28:39 字数 146 浏览 4 评论 0原文

我正在开发一个 .Net 2.0 应用程序,其中发生 StackOverflowException。有没有办法在应用程序中止之前/期间打印/记录堆栈跟踪? 这是一个长时间运行的服务器端进程,很难在调试器下执行。 我知道 StackOverflowException 无法被捕获。

I am developing a .Net 2.0 application in which a StackOverflowException occurs. Is there a way to print/log the stack trace before/during the application aborts?
This is a long running server-side process which would be hard to execute under a debugger.
I know that StackOverflowException can not be caught.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

亣腦蒛氧 2024-09-04 03:28:39

使用 ADPlus(来自 Windows 调试工具)在崩溃时强制转储。

例如

adplus -hang -pn <process name> -o <dump file>

Use ADPlus (from Windows Debugging Tools) to force a dump on crash.

E.g.

adplus -hang -pn <process name> -o <dump file>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文