A script-enabled browser is required for this page to function properly.

About debug actions

The PL/SQL Interpreter can be invoked from report code (triggers, user-named program units, libraries, and so on) by creating debug actions in the code. These are instructions that track the execution of PL/SQL program units so they can be monitored.

Each debug action you create is automatically assigned a unique numeric ID. While debugging, you can refer to this ID to browse, display, or modify a specific debug action with Reports Builder debug commands.

You can display detailed information about one or more debug actions, including its ID, source location, and whether or not it is enabled. You can temporarily disable specific debug actions and then re-enable them later if necessary.

There are two types of debug actions: breakpoints and debug triggers.

Breakpoints suspend execution at a specific source line of a program unit, passing control to the PL/SQL Interpreter.

Create breakpoints to identify specific debugging regions. For example, create a breakpoint at lines 10 and 20 to debug the code within this region.

With breakpoints, suspension occurs just before reaching the line on which the breakpoint is specified. At this point, use the PL/SQL Interpreter's features to inspect or modify program state. Once satisfied, resume execution with the GO or STEP commands, or abort execution using the RESET command.

Debug Triggers are a general form of debug action that associate a block of PL/SQL code with a specific source line within a program unit. When a debug trigger is encountered, Reports Builder executes the debug trigger code.

Create a debug trigger to execute a block of PL/SQL code provided at debug time in any of the following cases:

Debug triggers are especially useful as conditional breakpoints. You can raise the exception DEBUG.BREAK from within a trigger. For example, the debug trigger shown below establishes a conditional breakpoint on line 10 of my_proc, which will be reached only if the local NUMBER variable my_sal exceeds 5000:

PL/SQL>line 10 is
+> IF Debug.Getn('my_sal') > 5000 THEN
+> Raise Debug.Suspend;
+> END IF;

See also

About creating a debug action

Setting a breakpoint

Disabling and enabling debug actions

Deleting a debug action