Before you run your program, you can set breakpoints: places in the code where you want execution to pause so you can examine the situation before continuing. Breakpoints can be set in both the program and browser windows. In the source panes of these windows, there are dashes to the left of most statements, indicating places where breakpoints can be set. (This is a good reason to put individual statements on separate lines. Breakpoints can be placed only at the beginning of a line, not in the middle.)
To set a breakpoint, click one of the dashes. It will turn into a small red dot. When the execution reaches an active breakpoint, the program pauses and control returns to the debugger.
The breakpoints window contains a list of all the breakpoints in the program. If it's not on the screen, you can select it from View|
[0]Breakpoints.
You can temporarily disable a breakpoint without removing it entirely by clicking the red dot next to it in the breakpoints window. The dot changes to a circle. The breakpoint still exists in the program, but execution won't pause there. This is useful, for example, if you want to stop at a breakpoint the first time it is reached but not after. To reactivate a breakpoint, click the circle in the left column of the breakpoint window to cause the red dot to reappear.
A breakpoint may have a condition attached to it - a logical expression (e.g. sum >= 17). When execution reaches a breakpoint with a condition, it pauses only if the breakpoint is active and the condition is true. Conditions are entered in the breakpoints window to the right of the affected breakpoint.
You can view the location of a breakpoint in the source program by double clicking it in the breakpoints window. The browser window will jump to that location.
To permanently remove a breakpoint from the program, click the red dot next to the statement in the program window or symbol window (not the breakpoints window). The dot will change back to a dash to indicate that the breakpoint is gone.
Note:The Pro 3 debugger for Windows does not always pause properly
at the beginning of method main when it begins executing a program. If this happens, set a breakpoint at the start of the main method.