Operations with breakpoints
Last modified: March 2, 2023
A breakpoint informs the Debugger that an application should break or pause execution at a certain point. When a break occurs, you can use the Watches pane to evaluate your variables. A breakpoint will stop your code on the line of the source code which will be executed next. When the Debugger breaks program execution, the program remains in the break mode until you click Step Into, Step Over, Step Out, or Run to Continue.
The Breakpoints pane
The Breakpoints pane lists all breakpoints currently set in your program and displays their properties. In the Breakpoints pane, you can delete all breakpoints or the selected ones, enable or disable breakpoints, or go to the source code. The debugger can’t operate a breakpoint in the run mode. You can place a breakpoint in the run mode but it will be bound when the debugger enters the break mode.
Breakpoint status
A breakpoint status is indicated by an icon that appears in the gray bar to the left of the statement. When the breakpoint is selected, the debugger highlights the corresponding part of the statement. The breakpoint status can be:
- Enabled: The debugger suspends the execution at the specified breakpoint.
- Disabled: The debugger ignores this breakpoint.
- Error: No breakpoint can be set at this location; the location is illegal, and breakpoint cannot be bound. The debugger ignores this breakpoint.
Insert breakpoints
The SQL Complete Debugger provides a few ways to set breakpoints:
Insert breakpoints using the shortcut menu
To insert a breakpoint, in the source window, right-click a line of executable code where you want to set a breakpoint and select Insert Breakpoint.
The breakpoint icon appears in the gray bar to the left of the statement and in the Breakpoints pane.
Insert breakpoints using the Debug menu
To insert a breakpoint:
1. In the source window, place the cursor on a line of executable code where you want to set a breakpoint.
2. In the Debug menu, click Toggle Breakpoint or press F9.
Alternatively, in the gray bar to the left, select the line you want to break at and press F9.
The breakpoint icon appears in the gray bar to the left of the statement and in the Breakpoints pane.
Delete breakpoints
To delete a breakpoint, use one of the following options:
- In the Breakpoints pane, select the breakpoint and then click
Delete.
- In the Breakpoints pane, right-click the breakpoint and select Delete.
- In the gray bar to the left of the statement, click the breakpoint icon.
- Place the cursor over the code line with the breakpoint (it is highlighted with red color) and select Toggle Breakpoint on the Debug menu.
- Right-click the code line with the breakpoint and select Delete Breakpoint.
To delete all breakpoints, use either of the following options:
- In the Debug menu , select Delete All Breakpoints.
- In the Breakpoints pane, click
Delete All Breakpoints.
Enable or disable breakpoints
To enable or disable a breakpoint, use either of the following options:
- In the Breakpoints pane, select the checkboxes next to the breakpoints.
- In the Breakpoints pane, click
Disable/Enable All Breakpoints if you want to enable or disable all breakpoints in the code. Keep in mind that to disable all breakpoints, at least one breakpoint should be enabled. Otherwise, clicking this icon will enable all breakpoints.
To switch to the source code, in the Breakpoints pane, click Go To Source Code.