1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
* Copyright � 2007 Sun Microsystems, Inc. All rights reserved.
4
* Use is subject to license terms.
9
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
10
<title>Debugging: Threads Window</title>
11
<link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
15
<h2>Debugging: Threads Window</h2>
16
<p><small><a href="#seealso">See Also</a></small></p>
18
<p>The Threads window lists all threads in the current debugging session.
19
You open the Threads window by choosing Window > Debugging > Threads.</p>
20
<p>The information given for each thread is the thread name, state and if the thread is suspended.
21
One thread is the current thread.
22
By default, the current thread is the thread in the current session from which the debugger gained control.
23
When you select a different current session, the Threads window is updated to show the threads for that session.</p>
25
<h3><a name="threadstates">Thread States</a></h3>
26
<p>The following table describes the thread states for the debugger. </p>
27
<table border="1" cellpadding="5" cellspacing="0">
28
<tr align="left" valign="top">
29
<th scope="col">State</th>
30
<th scope="col">Description</th>
34
<td>Thread is waiting on a Java monitor.</td>
38
<td>Thread has not yet been started.</td>
42
<td>Thread is runnable.</td>
46
<td>Thread is sleeping. <tt>Thread.sleep()</tt> was called.</td>
50
<td>Thread status is unknown.</td>
54
<td>Thread is waiting. <tt>Object.wait()</tt> was called.</td>
58
<td>Thread has completed execution.</td>
62
<h3><a name="icons">Icons</a></h3>
63
<p>The following table describes the icons displayed to the left of the object name.</p>
64
<table border="1" cellpadding="5" cellspacing="0">
65
<tr align="left" valign="top">
66
<th scope="col">Icon</th>
67
<th scope="col">Description</th>
70
<td align="center"><img src="../images/CurrentThreadGroup.gif" alt="Current thread group"></td>
71
<td>The thread group that contains the current thread</td>
74
<td align="center"><img src="../images/ThreadGroup.gif" alt="Thread group"></td>
75
<td>A thread group that does not contain the current thread</td>
78
<td align="center"><img src="../images/CurrentThread.gif" alt="Current thread"></td>
79
<td>The current thread</td>
82
<td align="center"><img src="../images/RunningThread.gif" alt="Running thread"></td>
83
<td>A thread that is running and is not current</td>
86
<td align="center"><img src="../images/SuspendedThread.gif" alt="Suspended thread"></td>
87
<td>A thread that is suspended and is not current</td>
91
<h3><a name="actions">Actions</a></h3>
92
<p>Right-clicking the Threads window opens the pop-up menu, where you can choose the following actions:</p>
93
<table border="1" cellpadding="5" cellspacing="0">
94
<tr align="left" valign="top">
95
<th scope="col">Menu Item</th>
96
<th scope="col">Description</th>
99
<td>Make Current </td>
100
<td>Makes the selected thread the current thread. This command is equivalent to double-clicking the thread.</td>
104
<td>Resumes execution of the selected thread. </td>
108
<td>Suspends execution of the selected thread. </td>
112
<td>Interrupts execution of the selected thread. </td>
115
<td>Go to Source</td>
116
<td>Shows the source code for the newest frame on the selected thread's stack.</td>
119
<td>List Options</td>
120
<td>Enables you to customize the display of the Threads window, including adding and removing columns of information, reordering the columns, and sorting the columns.
121
See <a href="../debug_customize_views.html">Customizing a Debugger Window</a> for more information. </td>
126
<p>By default, all thread properties are displayed directly in the Threads window, except for the Suspended property.
127
To display the Suspended property in the Threads window,
128
click the <img src="../images/ChangeColumn.gif" alt="Change Column"> icon in the upper right corner of the window,
129
or right-click in the window and choose List Options > Change Visible Columns and then select the Suspended checkbox in the dialog box.</p>
130
<p>If a thread is suspended (for example because a breakpoint was reached during the debugging session),
131
the checkbox for that thread is selected in the Suspended column.
132
Deselecting the Suspended checkbox causes the thread to resume.</p>
135
<dt><a name="seealso">See Also</a></dt>
136
<dd><a href="../debug_context.html">Current Context in the Debugger</a></dd>
137
<dd><a href="../debug_threads.html">Debugging Threads in the IDE</a></dd>
138
<dd><a href="debug_window.html">Debugger Windows</a></dd>
141
<small><a href="../../credits.html">Legal Notices</a></small>
142
<table cellpadding="50" border="0">