The Threads window lists all threads in the current debugging session. For Java applications, this list also includes the thread groups in the Java virtual machine. You open the Threads window by choosing Window > Debugging > Threads.
The information given for each thread is the thread name and state. One thread is the current thread. By default, the current thread is the thread in the current session from which the debugger gained control. When you select a different current session, the Threads window is updated to show the threads for that session.
The following table describes the thread states for the debugger.
State | Description |
---|---|
Monitor | Thread is waiting on a Java monitor. |
Not Started | Thread has not yet been started. |
Running | Thread is runnable. |
Sleeping | Thread is sleeping. Thread.sleep() was called. |
Unknown | Thread status is unknown. |
Wait | Thread is waiting. Object.wait() was called. |
Zombie | Thread has completed execution. |
The following table describes the icons displayed to the left of the object name.
Icon | Description |
---|---|
![]() |
The thread group that contains the current thread |
![]() |
A thread group that does not contain the current thread |
![]() |
The current thread |
![]() |
A thread that is running and is not current |
![]() |
A thread that is suspended and is not current |
Right-clicking the Threads window opens the pop-up menu, where you can choose the following actions:
Menu Item | Description |
---|---|
Make Current | Makes the selected thread the current thread. This command is equivalent to double-clicking the thread. |
Resume | Resumes execution of the selected thread. |
Go to Source | Shows the source code for the newest frame on the selected thread's stack. |
List Options | Enables you to customize the display of the Threads window, including adding and removing columns of information, reordering the columns, and sorting the columns. See Customizing a Debugger Window for more information. |
You can see all the properties for a thread by right-clicking the node for the thread and choosing Properties.
By default, all properties are also displayed directly in the Threads window, except for the Suspended property.