Perl Debugging

perl -d  script_name.pl

it prompts,

DB<1>

USE the Foll accordingly:
  • h or h h – for help page
  • c – to continue down from current execution till the breakpoint otherwise till the subroutine name or line number,
  • p – to show the values of variables,
  • b – to place the breakpoints,
  • L – to see the breakpoints set,
  • d – to delete the breakpoints,
  • s – to step into the next line execution.
  • n – to step over the next line execution, so if next line is subroutine call, it would execute subroutine but not descend into it for inspection.
  • source file – to take the debug commands from the file.
  • l subname – to see the execution statements available in a subroutine.
  • q – to quit from the debugger mode

IN HERE  “s” , “n” and “q” are important.

For more Detailed Explanation:
http://www.thegeekstuff.com/2010/05/perl-debugger/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s