The Threads, call stacks, and data view displays the current status of all thread groups in your program. Each thread group expands to show its threads and contains a stack frame trace representing the current method call sequence. Each stack frame expands to show available data elements that are in scope. Icons visually indicate the type of data element. (Static data is not displayed in this view, but is displayed in the Loaded classes and static data view.) Items that are dimmed are inherited.
The default display of this view is split into two panes. The left pane can expand to show stack frames. The right pane displays the content of the item selected on the left, showing anything from a thread group to a variable. For example, if a thread is selected in the left pane, the right pane will show the stack frames for that thread. Alternatively, if a stack frame is selected in the left pane, the right pane will show the variables available in that view. (The split pane is a feature of JBuilder SE and Enterprise.) For more information about threads, see “Managing threads” on page 8-30.
Table 8.11 Icons in Threads, call stacks, and data view
Icon Description
The current stepping thread.
A thread group.
(Yellow) A blocked thread.
A suspended thread.
(Gray) A dead thread.
A class.
An interface.
(Colored) An object.
(Shaded) A null object.
A stack frame.
The selected stack frame.
An array.
A primitive.
(Red) An error.
(Gray) An informational message.
8-16 B u i l d i n g A p p l i c a t i o n s w i t h J B u i l d e r T h e d e b u g g e r u s e r i n t e r f a c e
Table 8.12 Context menu with selection in Threads, call stacks, and data view
Command Description
Keep Thread Suspended The selected thread will not be resumed when Run|
Resume Program is selected. Allows you to watch behavior of other threads. (JBuilder Enterprise) Set Stepping Thread The selected thread will be stepped into when Run|
Resume Program is selected. Allows you to watch the behavior of this thread. (JBuilder Enterprise) Set Execution Point Sets the stack frame on which resume operations will
be performed. (JBuilder Enterprise)
Cut Removes the value of a variable and puts it in the
clipboard. This command is available when a variable is selected. (JBuilder SE and Enterprise) Copy Copies the value of a variable to the clipboard. This
command is available when a variable is selected.
(JBuilder SE and Enterprise)
Paste Pastes the clipboard contents into another variable.
When the Paste command is used, both the cut or copied object variable and the pasted object variable point to the same object. This command is available when a variable is selected. (JBuilder SE and Enterprise)
Create Local Variable Watch Displays the Add Watch dialog box, where you create a watch on the selected local variable. The watch is added to the Data watches view. This command is available when a variable or variable array is selected. (JBuilder SE and Enterprise) Create Array Watch Displays the Add Watch dialog box, where you
create a watch on the selected array. The watch is added to the Data watches view. This command is available when an array is selected. (JBuilder SE and Enterprise)
Create Array Component Watch
Displays the Add Watch dialog box, where you create a watch on the selected array component. The watch is added to the Data watches view. This command is available when a component in an array is selected. (JBuilder SE and Enterprise)
Adjust Display Range Displays the Adjust Range dialog box, where you can adjust the number of array items that are displayed in the view. This command is available when an array is selected. (JBuilder SE and Enterprise)
Create ‘this’ Watch Displays the Add Watch dialog box, where you create a watch on the selected this object. The watch is added to the Data watches view. This command is available when a this object is selected. (JBuilder SE and Enterprise)
Create Class Watch Displays the Add Watch dialog box, where you create a watch on the selected class. The watch is added to the Data watches view. This command is available when a class is selected. (JBuilder SE and Enterprise)
T h e d e b u g g e r u s e r i n t e r f a c e
Create Object Watch Displays the Add Watch dialog box, where you create a watch on the selected object. The watch is added to the Data watches view. This command is available when an object is selected. An object watch watches the selected Java object. It expands to show data members for the current instantiation. (JBuilder SE and Enterprise)
Create String Watch Displays the Add Watch dialog box, where you create a watch on the selected String. The watch is added to the Data watches view. This command is available when a String is selected. (JBuilder SE and Enterprise)
Create Static Field Watch Displays the Add Watch dialog box, where you create a watch on the selected static field. The watch is added to the Data watches view. A static field is a Java variable defined as static (a class variable). This command is available when a static field is selected.
(JBuilder Enterprise)
Create Field Watch Creates a watch on the selected field and automatically adds the watch to the Data watches view. A field is a Java variable that is defined in a Java object. This command is available when a field is selected. (JBuilder SE and Enterprise)
Create Field Breakpoint Creates a breakpoint on the selected field and automatically adds the breakpoint to the Data and code breakpoints view. A field is a Java variable that is defined in a Java object. To activate the breakpoint, go to the Data and code breakpoints view and right-click the breakpoint. Choose Break On Read to force the debugger to stop when the field is about to be read, or Break On Write to stop when the field is about to be written to. This command is available when a field is selected. (JBuilder SE and Enterprise) Show Hex/Decimal Value Changes the display base of a numeric or character
variable. This command is available when a numeric or character variable is selected. Selecting this command for an array will change the base of its elements.
Show/Hide Null Values Toggles the display of a null values in an array. This command is useful when debugging a hash-map object. It is available when an array of type Object is selected. (JBuilder SE and Enterprise)
Change Value Displays the Change Value dialog box, where you can directly edit the value of a variable. This command is available when a variable is selected.
(JBuilder SE and Enterprise)
Table 8.12 Context menu with selection in Threads, call stacks, and data view (continued)
Command Description
8-18 B u i l d i n g A p p l i c a t i o n s w i t h J B u i l d e r T h e d e b u g g e r u s e r i n t e r f a c e