Set a breakpoint

Set a breakpoint in a line of code if you want to examine that area of code more closely.

To add a breakpoint, click in the gutter at the corresponding code line, or right-click and select Add/Delete breakpoint. The breakpoint displays as a red dot in the gutter.

Figure: Set Breakpoint

The figure shows a Set Breakpoint, indicated by a red dot in the margin.

To delete the breakpoint, click on the red dot, or right-click and select Add/Delete breakpoint.

To disable a breakpoint, right-click and select Enable/Disable breakpoint. A disabled breakpoint displays as a red dot with an empty center. You can enable the breakpoint later if required.

The Add/Delete breakpoint and Enable/Disable breakpoint options are disabled when the debugger is active.

Initial breakpoint

Set initial breakpoints prior to launching the Debugger. Otherwise, the application executes normally within the Debugger framework and you must use the Debugger Interrupt option to monitor Debug views or employ Debugger functions. Setting a breakpoint at the first function call is usually a good starting point.

Additional breakpoints

After the initial Breakpoint is set, you can either set additional breakpoints prior to starting the Debug session or start the session with the single breakpoint. Breakpoints on Function entry points automatically open the function source module during the debug session so you can examine the code more closely and even follow program execution line-by-line in the function. You may find it helpful to set function breakpoints before starting the session, but you can also set additional breakpoints as you use Debugger commands to navigate during the session.

Tip:

You can use the Code Structure view to quickly identify and open source modules so that you can set breakpoints as desired.  This is especially useful for functions in external modules.