[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Debugging running Perl code on Windows.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


<quote who="Jay Hannah">
> I'd add the debugging information and send it to a log. Debugging info
> is good to have in any program, regardless. If you don't want all the
> debug all the time, add a command line --debug parameter or something
> to activate it.
>
> If it sticks frequently I'd run it through the debugger:
> perl -d myprog.pl

Thanks, I'll keep that in mind.  This program will run every five minutes
for weeks at a time and only get a couple "stuck" processes after a week
so it's not predictable enough to debug interactively.

What I'll probably do is create a pseudo-random logfile in c:\temp\ each
time the process runs, then upon successfull completion of the script I'll
issue a cleanup command that will erase that log file.  Unless the perl
script is breaking in some other odd way, this should allow me to view
logs of stuck processes without consuming disk resources should this need
to run for months at a time.

ObPerlNote: The "END" directive is great for this -- I just found this
about two months ago and really like this "catch all" for the termination
of my scripts.

Dan

- - - - -
"I do not fear computer,
I fear the lack of them."
 -- Isaac Asimov

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBUDkgNiBNyqUzGb8RAncNAJ4iEiOnayJvCluD3oZZJ6XWtYFMsgCdGk7h
QJ3qZRpG7Bm12nMrfbNInJY=
=Hfla
-----END PGP SIGNATURE-----