Http://developer.51cto.com/art/201007/213719.htm
Http://www.ibm.com/developerworks/cn/linux/sdk/perl/culture-4/index.html
Http://www.sdsc.edu/~moreland/courses/IntroPerl/docs/manual/pod/perldebug.html#NAME
Http://www.pgsqldb.org/mwiki/index.php/PerlDebuger
The default Perl debugger is the Perl interpreter itself, plus the graphical interface debugger. Because we generally use Telnet to access the server while developing the program, this is mainly about the default command-line debugger usage.
Start the Perl interpreter with the-d command line option, for example
perl-dtest.pl into the Perl debugger's interactive interface.
The list of DEBUG commands is as follows: (all commands are below input at the debug prompt, the command is case-insensitive)
H: Displays the debugger's help information.
|h: Displays the debugger's help information as a paging form.
HH: Displays a compressed help message.
H Debug Command: Displays Help for a debug command.
A P expression in Perl debugger usage: Displays the value of a variable or expression without displaying the structure and data embedded in the complex variable.
X expression: Displays the value of a variable or expression, showing the embedded structure in a readable form for more complex variables.
and data.
V Package name variable names list: Displays the values of all (or part) variables within the specified package. (The default package name is main)
List of x variable names: Displays the values of all (or part) variables in the current package.
Note: The list of variable names in the V and X commands in the Perl debugger usage is separated by a space and the variable name should be removed $, @ or%
T: The call stack of the program is rolled back one level.
S-expression: Step into the child function. (Stepinto) If you provide an expression and include a function call in the expression, step into the function.
N expression: Stepping, bypassing the child function. (stepover)
C line number/function name: Executes to a row or a function.
L: Displays the contents of a window (one screen) that is not executed.
Lmin-max: Displays the contents of the file at Min to Max line.
L line Number: Displays the contents of the specified line.
L Function Name: Displays the contents of one window (one screen) of the specified function.
W line number: Displays the contents of a window (a screen) around a line.
F filename: Switch to another file.
/mode: Finds the matching string forward (end of file) in the current file.
? Mode: Finds a matching string in the current file, backward (header).
L: Displays all breakpoints and additional actions.
S mode: Displays the name of the function that matches (or does not match, plus!) in the pattern.
T: Toggle trace mode.
T-expression: Tracking execution of an expression procedure.
B Line number condition: Set a breakpoint on a line, interrupt when the program executes to the line and the condition is satisfied.
The B function name condition in Perl debugger usage: Set a breakpoint on a function that interrupts when the program executes to the function and the condition is satisfied.
Bload FileName: Sets a breakpoint on the first executable statement of a file.
D line number: Deletes a breakpoint on a row.
D: Remove all breakpoints.
A line number command: Add an additional action to a line in the program. Perform the additional action before executing the line statement.
A: Remove any attached actions that have been installed.
W expression: Adds a watch item.
W: Deletes all watches.
o option name?: The value of the query debugger optional.
o Option name = option value: Sets the value of the debugger's optional option.
Ltperl statement: Sets an action that displays the action performed before the debug prompt.
Ltltperl statement: Adds an action to be performed before the debug prompt is displayed.
Gtperl statement: Sets an action to take when leaving the debug prompt (into run state).
Gtgtperl statement: Adds an action that is performed when you leave the debug prompt (to run state).
{Debug command: Set an action that shows what to do before the debug prompt.
{{Debug command: Set an action that shows what to do before the debug prompt.
Note: Both the Perl and debug commands in the Perl debugger usage can be entered as multiple lines, with the end of line/escape.
!number: Re-executes the debug command that was executed in the previous number of times.
!-number: Re-execute the debug command that was executed a number of times before now.
! Mode: Re-executes the previously executed debug command that matches the pattern.
!! Command: Do not exit the debugger to execute a shell command.
H-number: Displays the previously executed number bar debug command. If number is omitted, all executed
debugging commands.
R: Restart the program you are debugging.
Q or ^d: Exit the debugger.
| Debug command: Displays the output of the debug command as paging.
|| Debug commands: Similar to | debug commands, suitable for debugging commands with large output, for example: | Vmain.
= Alias Value: An alias to a debug command, for example: =QUITQ. All unrecognized commands: executed as a Perl statement inserted. (using eval)
There are many Perl debugger usages that can be set up to customize the debugger's environment, which is itself developed in Perl, and there are interfaces in Perl publishing that allow you to develop other Perl debuggers. If you want to develop large projects in Perl, it is necessary to understand these details in detail. For examples of using the debugger and setting debugger options, refer to the documentation for Perldebug in the Perl release.