views:

208

answers:

3

Here's the scenario:

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.

This is very aggravating. Has anyone seen this before and know any workarounds or settings I could change?

A: 

Not sure if this will work (haven't got an Eclipse install to hand to confirm), but there's a debug option that you could try.

Under Run/Debug in the Preferences, there's an option called (something like) Activate debug view when a breakpoint is hit. If you uncheck that option Eclipse won't jump the focus to the debug view. It might also stop individual threads stealing the focus.

Rich Seller
+1  A: 

If the above does not help you can always disable all your breakpoints once you are debugging where you want to be.

In the Breakpoints view: Ctrl-A, Right click -> Disable

Ben
A: 

Could you use the option to stop all threads at the breakpoint?

bmargulies