Search VisualAge for Java Information Go to Information Home Page Go to VisualAge for Java WWW Site

Debug Page

The debugger page shows all running programs and threads, and lets you suspend them to see the methods in the stack and to inspect variables.  If no programs are running, the page is empty.

All Programs/Threads Pane
This pane lists all running programs and threads.  If you want to suspend a thread, select it and click the Suspend button suspend.gif (1037 bytes) in the toolbar.  Once the thread is suspended, this pane also lists the methods in the current stack, in chronological order from most recently called to first called.  You can step into and over methods, drop to a selected frame, run to the cursor, and resume or terminate execution.  Select a method to view its source code in the Source pane and to inspect its variables in the Visible Variable pane or in an Inspector window.

Visible Variables and Value Panes
When a thread is suspended and a method in the stack is selected, the Visible Variables pane shows the visible variables in the selected stack frame.  Variables are listed in a tree view, so that if a variable is composite, you can expand it by clicking on the plus symbol plus.gif (837 bytes) to see the variable values that it comprises.  Select an variable to see its current value in the Value pane.  You can select multiple variables by holding down the Ctrl or Shift key while clicking; the Value pane will show the values of all selected variables, in the order that they were selected.

You can modify a variable value by editing it in the Value pane and saving the changes (select Save from the Value pane's pop-up menu).  The new value is used when program execution is resumed.

Source Pane
When a thread is suspended, and a method in the stack is selected, the methods source is shown in the Source pane.  The Source pane has the following features:

If you have set the debugger option to generate the class initialization trace, then the Source pane shows the trace if you select a running program from the All Programs/Threads pane.

Menus
The following menus are available in the Debug page of the Debugger browser:

ngrelc.gif (533 bytes)
Debugging During the Development Cycle
Setting Breakpoints in Source Code
Evaluating Expressions in the Debugger
Modifying Code while Debugging
Inspecting and Modifying Variable Values
Stepping Through Methods
Suspending, Resuming, and Terminating Threads
Generating the Class Trace