Debugging basicsPerl can be easily debugged using Emacs. At least from the viewpoint of the occasional Perl programmer (which I am...) Open the script that needs debugging and call the perl debugger: M-x perldb You may enter any command line arguments you want to call the script with and then the debugger will start the code. The basic commands:
Debugging CGI scriptsIn order to debug CGI scripts you can append the variable values you would usually send with a POST as normal arguments to the perl script. A specific example from the AutoPrime program: I call the script 'AutoPrimeWeb' with the parameter 'html=3' with the URL 'AutoPrimeWeb?html=3'. I can create the same situation on the command line by opening the script with emacs, run # Start the debugger M-x perldb # The the CGI parameter Run perldb (like this): perl /srv/www/htdocs/molgen/AutoPrime-2.0.1/cgi/AutoPrimeWeb html=3 # Set the breakpoint to the problematic function b AutoPrimeWeb::process # And continue the code to that point c PDF of this file Back to Personal Wiki |