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
The default Perl debugger is the perl interpreter, and a GUI debugger. Because we are developingProgramGenerally, telnet is used to access the server. This section describes the usage of the default command line debugger.
Use the-D command line option to start the perl interpreter. For example:
The perl-dtest.pl enters the interaction interface of the Perl debugger.
The following is a list of Debugging commands: (all commands are entered at the top of the debugging prompt. The command is case sensitive)
H: displays the help information of the debugger.
| H: displays the help information of the debugger in pages.
Hh: displays a compressed help information.
H debugging command: displays the help of a debugging command.
In the usage of the Perl debugger, the p expression is used to display the values of variables or expressions. The embedded structure and data of complex variables are not displayed.
X expression: displays the value of a variable or expression. For more complex variables, the embedded structure is displayed in a readable form.
And data.
V package name variable name list: displays the values of all (or part) variables in the specified package. (The default package name is main)
X variable name list: displays the values of all (or part) variables in the current package.
Note: In Perl debugger usage, the list of variable names in the V and X commands is separated by spaces. Remove $, @, or % before the variable names.
T: The call stack of the program is rolled back to the first level.
S expression: One-step execution to go to the sub-function. (Stepinto) If an expression is provided and the expression contains a function call, it is entered into the function.
N expression: A single-step execution that goes beyond the subfunction. (Stepover)
C row number/function name: Execute to a certain row or function.
L: displays the unexecuted content of a window (one screen.
Lmin-MAX: displays the file content from min to Max.
L row number: displays the content of a specified row.
L function name: displays the content of a window (screen) of a specified function.
W row number: displays the content of a window (one screen) around a row.
F file name: switch to another file.
/Mode: Search for matched strings in the current file (at the end of the file.
? Mode: Search for matched strings in the current file (the file header.
L: displays all breakpoints and additional operations.
S Mode: display matching (or not matching, add before mode !) Function name.
T: Switch the tracking mode.
T expression: trace the execution expression process.
Row B condition: a breakpoint is set for a row. When the program runs until the row is reached and the condition is met, an interruption occurs.
In the usage of the Perl debugger, the B function name condition: sets a breakpoint on a function. When the program executes the function and the condition is met, an interruption occurs.
Bload file name: Set a breakpoint on the first executable statement of a file.
D row number: Delete the breakpoint of a row.
D: delete all breakpoints.
Line A command: add an additional operation to a line of the program. Execute the additional operation before executing the statement for this row.
A: delete all installed additional operations.
W expression: Add a monitoring item.
W: delete all monitoring items.
O option name? : Query the optional values of the debugger.
O option name = option value: Set the option value of the debugger.
Ltperl statement: Set an operation to display the operation executed before the debugging prompt.
Ltltperl statement: adds an operation that is executed before the debug prompt.
Gtperl statement: Set an operation that is executed when the debug prompt is left (transferred to the running state.
Gtgtperl statement: adds an operation that is executed when you exit the debugging prompt (transfer to running state.
{DEBUG command: Set an operation to display the operation executed before the debug prompt.
{DEBUG command: Set an operation to display the operation executed before the debug prompt.
Note: In the usage of the Perl debugger, both the preceding Perl statements and Debugging commands can be entered in multiple lines, and the lines are escaped at the end of the line.
! Number: Re-execute the debugging command previously executed for the second time.
! -Number: Re-execute the debugging command that was previously executed number of times.
! Mode: Re-execute the previously executed DEBUG command that matches the mode.
!! Command: Do not exit the debugger to execute a shell command.
H-number: displays the number of Debugging commands previously executed. If number is omitted, all executed
DEBUG command.
R: restart the program being debugged.
Q or ^ D: exit the debugger.
| Debugging command: display the output page of the debugging command.
| Debugging command: similar to | debugging command, suitable for Debugging commands with a large number of outputs, for example: | vmain.
= Alias value: an alias for a debugging command, for example, = quitq. All unrecognized commands: run as a Perl statement inserted. (Use eval)
there are many usage methods for the Perl debugger. You can set many options to customize the debugger environment, which is also developed using Perl, in addition, there are interfaces in the Perl release that allow you to develop other Perl debuggers. If you want to use Perl to develop large projects, you need to learn these details in detail. For examples of using the debugger and setting debugger options, see perldebug documentation in the Perl release.