All the threads created in the current session are displayed in the Threads window. For Java applications, this list also includes the thread groups in the application. You can open the Threads window by choosing Window > Debugging > Threads (Alt-Shift-7).
Only one thread is the current thread at any given time. By default, the current thread is the thread within the current session from which the debugger gained control. When you switch between threads to debug, the Call Stack and Local Variables windows are automatically updated to reflect the data applicable to that thread.
To change the current thread:
You can suspend execution of a thread if you think it is causing problems and then later resume the thread once the problem is solved.
In the Threads
window, the icon to the left of the thread name indicates whether the thread
is suspended or waiting to be resumed. indicates
the current thread.
indicates
a thread that is running and is not current, and
indicates
a thread that is suspended and is not current. You can also display the Suspend
property as a boolean flag (True or False) in the Threads window by clicking
the columns button (
)
and select the Suspend checkbox.
To suspend or resume a thread:
You can view the source code of a thread in the IDE's Source Editor if you think it is causing problems and want to examine it further.
To view a thread's source:
If the source of the thread is available, the Source Editor jumps to the current call on the thread's call stack.