I am using a web form I created as an interface to query a MySQL database. I have written some perl CGI scripts to process the queries. But I am not getting the desired output, so I need to debug the scripts. How do I do that? I mostly use Eclipse for debugging perl, but now I have the web form parameters (checkboxes, listboxes) as input to the script. Is there any way I can pass in the inputs from the web page and then debug the script in Eclipse? Or is there any other way of debugging in this case? Hope I have made myself clear. Thanks.
I use capture_CGI_input.pm Perl module for CGI debugging. It lets you capture all data sent to a CGI script, when running from a normal browser. It then lets you "replay" the script from anywhere (command line, within a debugger) using the captured data.
CGI::Inspect looks promising, though I haven't tried it yet myself.
Using Devel::DumpTrace during a normal CGI session (with the data being logged to a file, via DUMPTRACE_FH) is a way to do in-depth debugging, without using an actual debugger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With