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

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




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