Debugger window

The Debugger window helps you find and fix errors in your programs. Use the Debugger to:

If you want to see data values and watches, you must compile your program with symbolic debug information before debugging. Then begin the debugging session by choosing Run|Debug. The integrated debugger takes control whenever you run, trace, or step through your code.

When you run your program in the IDE, your program creates windows as usual, accepts user input, calculates values, and displays output. You can use debugger features to examine the current state of your program whether or not your program is running. By monitoring the values of variables, the methods on the call stack, and the program output, you can make sure that the area of code you are examining is performing as you designed it to.

As you run your program, you can watch the behavior of your application in the windows it creates. For best results during your debugging sessions, arrange the windows on your screen so you can see both the debugger and your application.

To open the Debugger window,

  1. In the Navigation pane, click a node that has been successfully compiled.
  2. Choose Run|Debug.

See also:
Building Applications with JBuilder: Overview of debugging
Building Applications with JBuilder Controlling program execution
Building Applications with JBuilder Using breakpoints
Building Applications with JBuilder Examining program data values

Tabbed pages and panes of the Debugger

During a debugging session, the AppBrowser window has two additional tabbed pages on the left side. These pages display the Debugger panes, some of which can be configured to display different types of information.
Debug By default, the upper left pane of the Debug tabbed page is configured as the Threads and Stack pane, and the lower left pane is configured as the Data pane.
Watch By default, configured as one large pane.

You can view the state of the program in the panes by:


Pane Purpose

Threads and Stack pane Displays the running thread groups and threads. The selected thread is the current context. Also displays the sequence of method calls that brought the program to its current state. This is the top pane of the Debug tab, by default.
Data pane Displays the values of all data members that are currently in use. This is the bottom pane of the Debug tabbed-page, by default.
Watch pane Displays the values of specific data members that you have selected for tracking. This is the left pane of the Watch tabbed-page, by default.
Source pane Displays the Java source code corresponding with the line selected in the Threads And Stack Pane. This pane is on the right side of the Debugger window.

Dialogs and windows for debugging


Dialog or menu Purpose for debugging

Breakpoint List window Manages and selects breakpoints, controls their settings and navigates among breakpoint lines.
Breakpoint Options dialog box Sets the type of breakpoint and conditions for automatic pausing.
Run/Deug page (Project Properties dialog) Controls whether to include debug information during compiling, sets the paths, and controls whether to compile automatically before debugging.
Context Tree Options dialog box Configures what type of information is shown in the panes of the Debugger window, or in the Debugger Context Browser window.
Execution Log window Monitors threads starting, classes being loaded, and breakpoints reached.
Debugger Context Browser window Displays information about threads, call stacks, or watches.
Evaluate/Modify dialog box Evaluates or changes the value of an expression or property.
Inspector window Displays the current value of a variable, evaluated in the context used when the Inspector was created.
Loaded Classes window Display which classes have been loaded and selects which classes to trace into while debugging.
Log Properties dialog box Selects what types of events are shown in the Execution Log window.
Run menu Starts the Debugger, traces into method calls, runs to a specified place, and adds watches and inspectors.
View menu Displays the list of loaded classes, the Execution Log, the Debugger Context Browser, or the list of breakpoints.
Debugger popup menus Configures, adds entries, and saves data from the panes of the Debugger.

Icons in the Debugger toolbar


Icon Menu Equivalent Meaning

Run|Run Executes your code from the current execution point. Reset if you want to run from the beginning.
Run|Step Over Executes the statement marked by the execution point. If the execution point marks a method call, the debugger executes that method at full speed, including any method calls within the method marked by the execution point.
Run|Trace Into Executes the statement marked by the execution point. If the execution point marks a method call, the debugger moves the execution point to the first line of code that defines the method being called.
Run|Program Pause Stops the running program temporarily, enabling you to single-step forward and inspect the program's state.
Run|Program Reset Quits the debugging session. The Debug and Watch panes disappear.