Kurinchi Blogger Scribbles …


Posts Tagged ‘debug’

Feb 14
2011

To debug struts, add the below line in the struts.xml file

Last updated: March 13th, 2011

//struts.xml
<struts>
<constant name=”struts.devMode” value=”true” />
…..
</struts>

Apr 30
2010

Perl: How to debug in Perl?

Last updated: April 30th, 2010

Turn on warnings by
use warning;

To run a perl script with warnings, type -w with the shebang as in
#!/usr/bin/perl -w
print “Content-type: text/html\n\n”;
print “Hello World\n”;

Check if you have the following line in the program
print “Content-type: text/html\n\n”;
This will output the text to the browser from the server.

Print error messages to the browser using
use CGI::Carp qw(fatalsToBrowser);

The other way is to use the print command to debug your program.

Common error messages
» The specified CGI application misbehaved by not returning a complete set of HTTP headers.
» Can’t locate missing-file.pm in @INC (@INC contains: ….. )


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict