Friday, January 18, 2013

Very useful Eclipse Debug option:Suspending Threads

Suspending Threads

This would be useful If incase eclipse is blocked and you exactly don't know the reason why call is blocking. You can just go to eclipse debug mode and suspend the main thread and worker threads. That will show you the stack frame.
To suspend an executing thread:
  1. Select the thread in the Debug View.
  2. Click the Suspend button [ Suspend ] in the view toolbar.
The thread suspends its execution. The current call stack for the thread is displayed, and the current line of execution is highlighted in the editor in the Debug Perspective.
When a thread suspends, the top stack frame of the thread is automatically selected.  The Variables View shows the stack frame's variables and their values.  Complex variables can be further examined by expanding them to show the values of their members.
When a thread is suspended and the cursor is hovered over a variable in the Java editor, the value of that variable is displayed.

No comments:

Post a Comment