Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
No such thing as a small change
 
PerlMonks  

Re^3: "omniscient debugging" for Perl

by magog (Beadle)
on Jul 06, 2005 at 15:22 UTC ( [id://472918]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: "omniscient debugging" for Perl
in thread "omniscient debugging" for Perl

Thanks for the tip, pemungkah!

The other problem is how to get the -d:Trace option to work under mod_perl.

Here's how to do it:

Add the following section to httpd.conf:

<Perl> $Devel::Trace::TRACE = 0; </Perl>

And start the server like this:

$ PERL5OPT=-d:Trace sudo /etc/init.d/httpd restart

Then in your code you can write:

$Devel::Trace::TRACE = 1; # some buggy code $Devel::Trace::TRACE = 0;

Problems:

  • Server spits out a mess of trace info before $TRACE is set to 0
  • Trace info (and there's a lot of it) goes to the error log, which is hard to manage

I think I'll try making a patch to allow turning off $TRACE via the command line, and to allow sending the trace info to a different file.

Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://472918]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.