DEBUG.INTERPRET
built-in procedureThis procedure executes the PL/SQL statement or Procedure Builder Interpreter command string contained in input as if it had been typed into the Interpreter.
PROCEDURE DEBUG.INTERPRET
(input VARCHAR2);
Parameter |
Description |
|
A Procedure Builder command string |
This is useful for automatically invoking Procedure Builder functions from a debug trigger.
/*
** Execute the command SHOW STACK when
** a condition is met
*/
IF DEBUG.GETC('my_ename') = 'JONES' THEN
DEBUG.INTERPRET('.SHOW LOCALS');
END IF;
You have a program unit foo that calls the subprogram bar. That subprogram (bar) is also called by many other program units. You want to create a breakpoint in bar, but you only want to enable the breakpoint when the subprogram is called from foo and not when it is called from other program units.
To do this, you need to perform the following steps:
You can perform both steps 1 and 2 from within the Breakpoint dialog box. Create a breakpoint with a breakpoint trigger in procedure foo that enables the first breakpoint we created in procedure bar. For example:
PL/SQL>.BREAK PROC foo LINE 6 TRIGGER
>BEGIN
> DEBUG.INTERPRET('.enable break 1');
> DEBUG.INTERPRET('.go');
>END;
The following example creates a breakpoint which fires a trigger each time the breakpoint is hit.
PL/SQL> .break proc my_proc line 10 trigger
+> DEBUG.INTERPRET('.SHOW LOCALS');
About the DEBUG
built-in package
Copyright © 1984, 2005, Oracle. All rights reserved.