简体   繁体   English

Eclipse 调试器 - 跳转到或仅显示挂起的线程

[英]Eclipse debugger - jump to or show only suspended thread

I have a Java application with a lot of threads.我有一个有很多线程的 Java 应用程序。 While debugging, and when execution in one thread was stopped by a break point, it's pretty annoying to scroll between all the threads to find the suspended thread.在调试时,当一个线程中的执行被一个断点停止时,在所有线程之间滚动以找到挂起的线程是非常烦人的。 Is there a way (a button, shortcut key, whatever) to jump to the suspended thread, or better - to hide all not suspended threads?有没有办法(按钮、快捷键等)跳转到挂起的线程,或者更好 - 隐藏所有未挂起的线程?

I agree it is very annoying, and the answer very disappointing.我同意这很烦人,答案很令人失望。 But I think I found kind of a way:但我想我找到了一种方法:

  • select the Debug view select 调试视图
  • type Ctrl-F to open the Find window for that view键入Ctrl-F以打开该视图的 Find window
  • type *Suspen类型 *暂停
  • select the thread you want select 你想要的线程

Not ideal, but does the job for me.不理想,但对我有用。

Using "Eclipse IDE" and in the Debug window there's a down arrow dropdown in the top right of that window/section.使用“Eclipse IDE”并在 Debug window 中,该窗口/部分的右上角有一个向下箭头下拉菜单。

  • Click the vertical ellipsis (or the down arrow if using an Eclipse release earlier than 2019-12)单击垂直省略号(如果使用早于 2019-12 的 Eclipse 版本,则单击向下箭头)
  • Click Java点击 Java
  • "Show Running Threads" was defaulted to clicked for me “显示正在运行的线程”默认为我点击
  • Click "Show Running Threads"点击“显示正在运行的线程”

Go back into this dropdown and now it's unchecked, doesn't seem to work 100% but definitely trims down on the showing threads Go 回到这个下拉列表,现在它没有被选中,似乎不能 100% 工作,但肯定会减少显示线程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM