[Omaha.pm] Debugging running Perl code on Windows.
Jay Hannah
jay at jays.net
Tue Sep 21 08:16:39 CDT 2004
On Sep 20, 2004, at 11:04 PM, Daniel Linder wrote:
> Occasionaly the perl interperter gets stuck and will wait forever.
> Does
> anyone know of a way to hook into the running perl process under
> Windows
> to see what it is really waiting for? If it helps, I'm using the Open
> Perl IDE (http://open-perl-ide.sourceforge.net/). My last resort is to
> put a ton of debug logging into the script and let it run but I'd
> rather
> not add that overhead...
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
c # "continue". Run the program until I stop you.
# process runs for a while then hangs
^C # break
# now you can see what line number the program stopped on.
v # print several lines of source w/ ==> pointing at the current line
. # print the current line again
HTH,
j
More information about the Omaha-pm
mailing list