Using TRACE in Stored Procedures
Posted in 1999
Topics: Stored Procedures & SPL
Howdy All!
I am a new Informix user in need of help! I am trying to use the Trace
functionality in my SP to debug, but it doesn't seem to want to
cooperate. As far as I can tell I have my sp set up like the docs. I
get no compile errors and it executes successfully!
Here is my dilemma: I have all the TRACE stmts in the sp, but I get no
debug file....I have specified it with the SET DEBUG... even went so
far as to precreate an empty text file wiht the same name.
Here is a test proc that I was using to see how TRACE worked:
create procedure test_proc()define i INT;
SET debug file to 'c:\\test.log';
trace off;
trace 'entering foo';
trace on;
trace 'Print this please!!';
let i=0;
let i=i+1;
trace off;
trace 'i+1=' || i+1;
Trace 'exiting test proc';
set debug file to 'c:\\test2.log';
end procedure
This is an example piece of code straight from the Docs. It compliles
and runs successfully.
All I really want is to be able to use the TRACE ' print this.. '
statements.
I am running Informix 7.3 on NT4.0.
Any suggestions on settings I need to apply, settings to check....??
--
Thanks for the help!
Libby
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Well....I found out what was happening...It was putting my trace file
on the server. Since I was working on my local PC I didn't even think
to look on the server!
Oh well.
Libby
In article <7qp6tb$slh$1@nnrp1.deja.com>,
Libby Elliott <elliottel@my-deja.com> wrote:
> Howdy All!
>
> I am a new Informix user in need of help! I am trying to use the
Trace
> functionality in my SP to debug, but it doesn't seem to want to
> cooperate. As far as I can tell I have my sp set up like the docs. I
> get no compile errors and it executes successfully!
>
> Here is my dilemma: I have all the TRACE stmts in the sp, but I get
no
> debug file....I have specified it with the SET DEBUG... even went so
> far as to precreate an empty text file wiht the same name.
>
> Here is a test proc that I was using to see how TRACE worked:
>
> create procedure test_proc()> define i INT;
> SET debug file to 'c:\\test.log';
> trace off;
> trace 'entering foo';
> trace on;
> trace 'Print this please!!';
> let i=0;
> let i=i+1;
> trace off;
> trace 'i+1=' || i+1;
> Trace 'exiting test proc';
> set debug file to 'c:\\test2.log';
> end procedure
>
> This is an example piece of code straight from the Docs. It compliles
> and runs successfully.
>
> All I really want is to be able to use the TRACE ' print this.. '
> statements.
>
> I am running Informix 7.3 on NT4.0.
>
> Any suggestions on settings I need to apply, settings to check....??
>
> --
> Thanks for the help!
>
> Libby
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
--
Thanks for the help!
Libby
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Hi Libby, There is a less painful way to debug stored procedures than to put tracing statements and then retrieve and analyze the trace file from the server. You can check SPL Workstation product at www.agsltd.com It has interactive visual debugger for stored procedures and triggers that allows to execute your SP code line-by-line, set breakpoints, watch and edit values of variables etc. It also includes the complete development and tuning environment for SPL including color-coded Editor, Execution Plan Analyzer, procedure's dependencies analyzer, Object Explorer and other tools specifically designed to make all server-side code related tasks easier. Regards, Arkady Libby Elliott wrote in message <7qp6tb$slh$1@nnrp1.deja.com>... > Howdy All! > >I am a new Informix user in need of help! I am trying to use the Trace >functionality in my SP to debug, but it doesn't seem to want to >cooperate. As far as I can tell I have my sp set up like the docs. I >get no compile errors and it executes successfully! > >Here is my dilemma: I have all the TRACE stmts in the sp, but I get no >debug file....I have specified it with the SET DEBUG... even went so >far as to precreate an empty text file wiht the same name. >