The Perl symbolic debugger is invoked with perl -d.

h    Prints out a help message.
T    Prints a stack trace.
s    Single steps.
n    Single steps around subroutine call.
RETURN key    Repeats last s or n.
r    Returns form the current subroutine.
c [ LINE ]    Continues (until LINE, or another breakpoint, or exit).
p EXPR    Prints EXPR.
w    Lists window around current line.
    Lists previous window.
f FILE    Switches to FILE and starts listing it.
l SUB    Lists the named subroutine.
S    List the names of all subroutines.
/PATTERN/    Searches forward for PATTERN.
?PATTERN?    Searches backward for PATTERN.

l [ RANGE ]    Lists a range of lines. RANGE may be a number, start-end, start+amount, or a subroutine name. If RANGE is omitted, lists next window.

b [ LINE [ CONDITION ] ]     Sets breakpoint at LINE; default is the current line.
b SUB [ CONDITION ]    Sets breakpoint at the subroutine.
d [ LINE ]    Deletes breakpoint at the given line.
D    Deletes all breakpoints.
L    Lists lines that have breakpoints or actions.
a LINE COMMAND    Sets an action for line.
A    Deletes all line actions.
< COMMAND    Sets an action to be executed before every debugger prompt.
> COMMAND    Sets an action to be executed before every s, c or n command.
V [ PACKAGE [ VARS ] ]  Lists all variables in a package. Default package is main.
X [ VARS ]    Like V, but assumes current package.
! [ [-]NUMBER ]    Re-executes a command. Default is the previous command.
H [ -NUMBER ]    Displays the last -NUMBER commands of more than one letter.
t    Toggles trace mode.
=[ ALIAS VALUE ]    Sets alias, or lists current aliases.
q    Quits. You may also use your EOF key character.
COMMAND    Executes COMMAND as a Perl statement.

Leave a Reply

Your email address will not be published. Required fields are marked *