Debug package : Utility Package « PL SQL « Oracle PL / SQL






Debug package

 
SQL>
SQL> CREATE OR REPLACE PACKAGE Debug AS
  2    PROCEDURE Debug(p_Description IN VARCHAR2,
  3                    p_Value IN VARCHAR2);
  4
  5    PROCEDURE Reset;
  6  END Debug;
  7  /

Package created.

SQL>
SQL> CREATE OR REPLACE PACKAGE BODY Debug AS
  2    PROCEDURE Debug(p_Description IN VARCHAR2,
  3                    p_Value IN VARCHAR2) IS
  4    BEGIN
  5      DBMS_OUTPUT.PUT_LINE(p_Description || ': ' || p_Value);
  6    END Debug;
  7
  8    PROCEDURE Reset IS
  9    BEGIN
 10      DBMS_OUTPUT.DISABLE;
 11      DBMS_OUTPUT.ENABLE(1000000);
 12    END Reset;
 13  BEGIN /* Package initialization code */
 14    Reset;
 15  END Debug;
 16  /

Package body created.

SQL>
SQL>
SQL>

 








Related examples in the same category

1.stop_watch
2.Debug package based on UTL_FILE
3.This object type represents a point on a Cartesian grid.
4.Debug package: inserts into a test table
5.Debug package: uses DBMS_OUTPUT.
6.time the performance enhancements of native dynamic SQL.