Using the debugger, you can locate and correct bugs in your program. The following steps introduce you to debugging in the IDE.
To step through the code:
The cursor appears at the beginning of the initComponents method.
The line is highlighted to indicate that a breakpoint was set.
Alternatively, you can set a line breakpoint by choosing Debug
New Breakpoint from
the main IDE window. The New Breakpoint dialog box allows you to add
different types of breakpoints and configure the breakpoint's settings.
A debugging session begins and the first line in the main method is highlighted. The IDE switches to the debugging workspace, which displays:
The breakpoint is removed.
Alternatively, click the line with the breakpoint and choose
Debug Toggle
Breakpoint from the main menu.
The Call Stack view is updated.
You have now completed the ColorSwitch tutorial.
Back: Compiling and Running Your Program |
See Also | |
---|---|
Debugging Programs
Current Context in the Debugger Setting Breakpoints |