Using Breakpoints

You can set breakpoints so that Oracle PL/SQL Debugger breaks program execution at breakpoint locations in the debug process.

Note: The PL/SQL debugger can only bind breakpoints to a PL/SQL program when the debugging process has started and the PL/SQL program is loaded.

PL/SQL debugging supports these breakpoint activities:

Oracle PL/SQL debugging does not support the following types of breakpoint:

Breakpoint Status

Breakpoint status is indicated by symbols that appear in the gray margin, at the left, in the source window. They are:

How Breakpoints Work

To use or set breakpoints, you must make sure that there is a solution opened in the Visual Studio. You cannot set breakpoints if there is no solution open in Visual Studio. When Server Explorer starts or when PL/SQL debugging starts, the solution is created automatically.

Saving and Retrieving Breakpoints

Breakpoint information is saved in a solution. To save breakpoint information, you must open the solution, set breakpoints, and save the solution. When you open the solution, breakpoint information is retrieved from the solution. If you set breakpoints and close the solution without saving, the breakpoint information is gone.

Controlling Breakpoints

You can control breakpoints in the PL/SQL source window in two ways:

Inserting a Breakpoint

To insert a breakpoint, either click in the gray margin next to the area where you want to set the breakpoint, or place the cursor at the desired location in the PL/SQL source window, and select Insert Breakpoint from the menu.

Removing a Breakpoint

To delete a breakpoint, either click on the breakpoint symbol that you want to delete, or right-click the line in the source window that contains the breakpoint, and select Remove Breakpoint from the menu.

Enabling and Disabling Breakpoints

The enable and disable breakpoint commands are toggles.

To enable a disabled breakpoint, either click on the disabled breakpoint symbol that you want to enable, or right-click in the source window that contains the disabled breakpoint, and select Enable Breakpoint from the menu.

The process is the same to disable an enabled breakpoint.

Editing a Breakpoint

To modify a breakpoint, right-click the line that is associated with the breakpoint symbol and select Breakpoint Properties from the menu. When the Breakpoint dialog box appears, you can edit the basic breakpoint properties, such as file name, line and character number.

Note: Oracle PL/SQL Debugger can only insert a breakpoint at the beginning of the line, and ignores the character field.

Select Hit Count to specify the maximum number of hits that occur before execution breaks.