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.
See also:
Overview of debugging
Controlling program execution
Using breakpoints
Examining program data values
![]() |
Debug |
![]() |
Watch |
By default, the left part of the Watch page is configured as a single large Watch pane.
To open the Debugger window,
Pane | Purpose |
Thread 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. |
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. | |
Dialog or menu | Purpose for debugging |
Breakpoint List window | Manage and select breakpoints, to control their settings and navigate among breakpoint lines. |
Breakpoint Options dialog box | Set the type of breakpoint and conditions for automatically pausing. |
Project Properties dialog | Control whether to include debug information during compiling, set the paths, and control whether to compile automatically before debugging. |
Context Tree Options dialog box | Configure what type of information is shown in the panes of the Debugger window, or in the Debugger Context Browser window. |
Execution Log window | Monitor threads starting, classes being loaded, and breakpoints reached. |
Debugger Context Browser window | View information about threads, call stacks, or watches. |
Evaluate/Modify dialog box | Evaluate or change the value of an expression or property. |
Inspector window of the Debugger | View the current value of a variable, evaluated in the context used when the inspector was created. |
Loaded Classes window | View which classes that have been loaded, to select which classes to trace into while debugging. |
Log Properties dialog box | Select what types of events are shown in the Execution Log window. |
The Run menu | Start the Debugger, trace into method calls, run to a specified place, and add watches and inspectors. |
The View menu | Show the list of loaded classes, the Execution Log, a Debugger Context Browser, or the list of breakpoints. |
Debugger context menus | Configure, add entries, and save data from the panes of the Debugger. |
Icon | Menu Equivalent | Explanation |
![]() |
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. |