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 line is highlighted to indicate that a breakpoint was set.
Alternatively, you can set a breakpoint by choosing Debug
New Breakpoint from
the main 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 program runs until it reaches the breakpoint. The IDE switches to the debugging workspace, which displays:
The next method call is highlighted.
The first line in the main method is highlighted.
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 |