Threads/Stack Tab
In the Threads/Stack tab you can view the threads in a thread group, the stack frames in a thread, and the variables local to each stack frame. You can track the value of a variable as you step through your source code. You can also suspend and resume threads. The stack frame in which program execution stopped is highlighted.
Thread Groups
Initially, the Threads/Stack tab lists the following thread groups that make up the current project:
- The main thread group. This group includes the threads that run in the browser. Any keyboard action by the user interacts with the threads in the main thread group.
- The thread group that represents the browser that executes the project (for applet projects only). The applet runs in either the Java WorkShop Browser (the sun.jws.Main thread group) or the Applet Viewer (the sun.applet.AppletViewer.main thread group). You can choose which browser you want to use in the Debug/Browse tab in the Project Manager.
- The thread groups particular to the project. If you cannot find the current stopping point inside this thread, try looking inside the browser thread groups.
Threads
Click the 
glyph to list the threads that make up a thread group. Each entry is in the form of
"AWT-Motif" (java.lang.Thread) at breakpoint (priority 5)
where
- AWT-Motif is the thread class
- java.lang.Thread is the thread name
- "at breakpoint" is the thread state
- priority 5 is the priority for running the thread. The thread with the highest number of priority is run first.
The glyph accompanying a thread is an additional clue as to the state of the thread. In all, a thread can be in one of seven states.

The state of the thread cannot be determined.

Thread is a zombie (has been exited, but has not yet been reaped or has been constructed but not yet started).

Thread is running.

Thread is sleeping.

Thread is waiting on a conditional variable.

Thread is suspended.

Thread is stopped at a breakpoint.
Clicking the 
glyph a second time contracts the thread group.
Stack Frames
When you click a thread glyph, the thread expands to show the stack frames in the thread. Each frame is marked with the 
glyph. The stack frames are listed in the order in which they were called. The stack frame that was executing when the program stopped is at the top of the stack. The initial stack frame is at the bottom of the stack. If a class does not have a stack frame, try recompiling your program with the -g option.
Clicking a thread group a second time contracts the thread.
Local Variables
Clicking the 
glyph lists the variables local to the stack frame. Objects are marked with the 
glyph. When you click this glyph, the object expands to show all embedded variables within the object. You can repeat this action on nested objects. Variables that are out of scope are dimmed.
Command Buttons
The Threads/Stack tab includes the following command buttons. Most buttons work on the selected thread. To select a thread, click its name.
- Suspend
- Suspends execution of the selected thread. Select a thread by clicking on its name.
- Suspend All
- Suspends execution of all nonsystem threads.
- Step Into
- Single-steps one source line; if the source line is a method call, executes the first statement of the method and stops.
- Resume
- Continues execution of the selected thread from where the thread is currently stopped.
- Resume All
- Continues execution of all threads.
- Step Over
- Single-steps one source line; if the source line is a method call, executes the entire method without stepping through the individual method instructions.
- Show Source
- Locates the source of the selected stack frame and displays it in the Source Editor.
- Update View
- Updates the Threads/Stack tab to show the most current state of threads in your program.
- Restart
- Kills the current debugging session and starts a new session. Breakpoints are retained across restarts.