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 can open the Threads window by choosing Window Debugging
Threads
(Ctrl-Alt-7). If you open the Threads window when a debugging session is running,
it closes automatically when you end the debugging session. If you open the
window when no debugging session is running, it stays open until you close it.
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 within 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.
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 |
The contextual menu in the Threads window includes the following items.
Menu Item |
Description |
---|---|
Make Current | Makes the selected thread the current thread. This command is equivalent to double-clicking the thread. |
Suspend/ Resume Thread |
Suspends or 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. |
Properties | Displays the properties of the selected thread. |
See Also | |
---|---|
Current Context in the Debugger
Suspending and Resuming a Thread Viewing the Source Code of a Thread Making a Thread Current Debugger Windows |