What tracing/Debugging tool isavailable for oracle procedures? I have written a simple procedure usin PL/SQL and I want to trace it so that I can see the source of errors.
Native PL/SQL (to my knowledge) lacks industry-standard tracing/stepping tools to debug its code. I believe that there are other utility packages that provide PL/SQL code stepping/debugging, but nothing built-in in native PL/SQL.
The relatively quick and easy technique that I use for debugging both run-time and logic errors is to shuffle into my code statements that display progress through code or intermediate variable values:
Code:
set serveroutput on format wrap
declare
x number := 0;
procedure p (x varchar2) is dbms_output.put_line(x); end;
begin
p('1');
x := x + 1:
p('2: x = '||x);
<some other code>
p('3');
<more code>
p('4');
end;
/
The "p" (print) statements display stepping and intermediate results that should help you diagnose your problem. Then, when you have diagnosed your problem, you can remove the "p" statements.
Let us know if my "poor man's" debugging technique provides a reasonable solution to your need.
Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.