in reply to Easy, elemental, but cool debug trick.
if ($debug>3) {print "Program Name: Error. $!";} ##DEBUG
I use 0=normal, 1..5 for more and more detail up to full DBI negotiation, and unique negative number ranges for debugging special cases.
This plus the block commenting code above seems useful. The worst thing I've had is a client that actually sent me back modified code (stripped out all my debugging and copyright info, also renaming the files, since their server couldn't handle something they had requested) and I had to take Ediff to it. You'd think the perl interpreter would not spend much time on testing the predefined constant..
You can also print to STDERR which you should be able to catch live in another window by grep tail your.httpd.error.log otherwise you'll need to turn on/off httpd header print statements in your code to be able to catch early config errors. Maybe better to look at that log agent module or something spiffier for mod_perl segfault strangeness..
Best regards,
Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Easy, elemental, but cool debug trick.
by mattr (Curate) on Jun 11, 2000 at 15:15 UTC |