如何在 Eclipse 中强制线程转储? [英] How to Force Thread Dump in Eclipse?

查看:28
本文介绍了如何在 Eclipse 中强制线程转储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将通过 BEA Weblogic Server v9.2 运行时环境在 Eclipse 内启动一个 Weblogic 应用程序.如果这是直接从命令行运行,我会按 ctrl-BREAK 来强制线程转储.有没有办法在 Eclipse 中做到这一点?

I'm launching a Weblogic application inside Eclipse via the BEA Weblogic Server v9.2 runtime environment. If this were running straight from the command-line, I'd do a ctrl-BREAK to force a thread dump. Is there a way to do it in Eclipse?

推荐答案

确实(感谢 VonC 指向 SO 线程),Dustin 在对他的消息的评论中指向 jstack.

Indeed (thanks VonC to point to the SO thread), Dustin, in a comment to his message, points to jstack.

我在 Eclipse 中运行了一个小 Java 应用程序(带有 GUI),我可以在 Windows 的进程管理器中看到相关的 javaw.exe 及其 PID,7088(当然在 Unix 中更简单).

I have run a little Java application (with GUI) in Eclipse, I can see the related javaw.exe in Windows' process manager and its PID, 7088 (it is even simpler in Unix, of course).

如果我在命令提示符下输入 jstack 7088,我会得到每个线程想要的堆栈转储.
很酷.

If I type at a command prompt jstack 7088, I have the wanted stack dump per thread.
Cool.

如果我们可以直接从 Eclipse 执行此操作会更好,但这已经很有用了.

Would be better if we could do that directly from Eclipse, but that's already useful as is.

这篇关于如何在 Eclipse 中强制线程转储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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