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

DEBUG.INTERPRET built-in procedure

This procedure executes the PL/SQL statement or Procedure Builder Interpreter command string contained in input as if it had been typed into the Interpreter.

Syntax

PROCEDURE DEBUG.INTERPRET
(input VARCHAR2);

Parameter

Description

input

A Procedure Builder command string

Usage notes

This is useful for automatically invoking Procedure Builder functions from a debug trigger.

Examples


/*
** 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:

  1. Create a breakpoint in procedure bar where you want to suspend execution.
  2. Disable the breakpoint you just created.

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');

See also

About the DEBUG built-in package

DEBUG built-in package