I'm debugging a server process running in Eclipse 3.4.1. There are 20 threads or so, waking up at various interval after sleeping.
I set a breakpoint in one method on one thread, and Eclipse stops there properly. The thread is expanded with a stack trace in the Debug view, and I can use the various buttons to step through. This is all what I expect.
My problem is that it seems like when another running thread wakes up while I am stepping through, it steals the focus in the Debug view. My suspended thread is not selected or expanded anymore (it has a + next to it) and all the buttons are disabled. I have to click back on the suspended thread to continue debugging.
Has anyone seen this before and know any workarounds or settings I could change?
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.
By default only the thread that hits the breakpoint stops. However, you can modify the behavior by changing the breakpopint properties. Save this answer.
As a user I would suggest the following: make a hotkey to exit the loop in debugging mode, for example ctrl-shift-F11.
You could suspend the entire Java VM not only the executing thread to get rid of the focus problems.
Select a breakpoint in the breakpoints view and choose "Suspend VM" instead of "Suspend Thread". Under Preferences->Java->Debug you can make "Suspend VM" the default option.
I have had the same problem when debugging Play!Framework 2 applications. What seems to have finally solved it is to uncheck Java -> Monitors in the debug perspective/thread view panel context menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With