DEBUG.GETX
built-in procedureThis procedure retrieves the value of the specified local variable.
FUNCTION DEBUG.GETC (varname VARCHAR2)
RETURN VARCHAR2;
FUNCTION DEBUG.GETD (varname VARCHAR2)
RETURN DATE;
FUNCTION DEBUG.GETI (varname VARCHAR2)
RETURN PLS_INTEGER;
FUNCTION DEBUG.GETN (varname VARCHAR2)
RETURN NUMBER;
Parameter |
Description |
|
A |
This is useful when you want to determine a local's value from within a debug trigger.
/*
** Retrieve the value of the variable 'my_ename'
** and use it to test a condition
*/
IF DEBUG.GETC ('my_ename') = 'JONES' THEN
RAISE DEBUG.BREAK;
END IF;
You have a program unit foo that calls the subprogram bar. That subprogram (bar) is also called by many other program units. Consider the situation where procedure bar accepts the argument 'message' from the many procedures that call it. Procedure foo passes a unique argument of 'hello world' to bar. In this case, we could define a trigger that raises a breakpoint in procedure bar only when foo passes its argument:
PL/SQL> .TRIGGER PROC bar LINE 3 IS
>BEGIN
> IF DEBUG.GETN('message') = 'hello world' THEN
> RAISE DEBUG.BREAK;
> END IF;
>END;
About the DEBUG
built-in package
Copyright © 1984, 2005, Oracle. All rights reserved.