N
Nelson Ashton
At my previous shop we all used Eclipse. Now we all use NetBeans.
One thing I found very handy in Eclipse was that you could debug a
program, and if it froze or otherwise misbehaved, you could hit pause
and look at where all of the current threads were in the program. This
was useful for diagnosing deadlocks (you'd find threads sitting on
synchronized (foo) lines) and infinite loops (the thread that was
supposed to be making progress would be sitting in the particular loop
that it was never escaping from).
Now I have a similar problem to debug, but I can't for the life of me
figure out how to coax NetBeans into coughing up a report on where all
currently-executing threads got suspended after hitting the pause
button. The only apparent way to get thread information, so far, is to
guess at a possible deadlock/infinite loop site, put a breakpoint
there, run the app, and pray; then move the breakpoint to another
guessed location and run again; and so on possibly all bloody day.
There surely must be a better way?
One thing I found very handy in Eclipse was that you could debug a
program, and if it froze or otherwise misbehaved, you could hit pause
and look at where all of the current threads were in the program. This
was useful for diagnosing deadlocks (you'd find threads sitting on
synchronized (foo) lines) and infinite loops (the thread that was
supposed to be making progress would be sitting in the particular loop
that it was never escaping from).
Now I have a similar problem to debug, but I can't for the life of me
figure out how to coax NetBeans into coughing up a report on where all
currently-executing threads got suspended after hitting the pause
button. The only apparent way to get thread information, so far, is to
guess at a possible deadlock/infinite loop site, put a breakpoint
there, run the app, and pray; then move the breakpoint to another
guessed location and run again; and so on possibly all bloody day.
There surely must be a better way?