Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse debugger - jump to or show only suspended thread

I have a Java application with a lot of threads. 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?

like image 523
duduamar Avatar asked Jul 05 '11 20:07

duduamar


People also ask

How do I view threads in Eclipse?

When you have started your application in debug mode. You can see the threads in the Debug view which is in the Debug perspective by default. For detailed information you have to use VisualVM.

How do I show static variables in Eclipse debugger?

Variables. We can see the values of variables during the execution under the Variables view. In order to see the static variables, we can select the drop-down option Java -> Show Static Variables. Using the variables view, it's possible to change any value to the desired value during the execution.

How do I debug multiple threads in Eclipse?

Start debug session. When the breakpoint in run is hit, you can go to another breakpoint, enable that breakpoint if it was disabled. Then right click on the breakpoint -> go to Filters, now you can select the thread you want the breakpoint to be remain enabled for and you can uncheck the rest of the threads.

What is toggle breakpoint in Eclipse?

A breakpoint is a signal that tells the debugger to temporarily suspend execution of your program at a certain point in the code. To define a breakpoint in your source code, right-click in the left margin in the Java editor and select Toggle Breakpoint. Alternatively, you can double-click on this position.


1 Answers

I agree it is very annoying, and the answer very disappointing. But I think I found kind of a way:

  • select the Debug view
  • type Ctrl-F to open the Find window for that view
  • type *Suspen
  • select the thread you want

Not ideal, but does the job for me.

like image 186
Nicolas C Avatar answered Sep 21 '22 23:09

Nicolas C