Chapter 42. The Perl Debugger
The Perl symbolic debugger is invoked with perl -d.
Any input to the debugger that is not one of the commands enumerated below is evaluated as a Perl expression.
a
[ line ] commandSets an action for line.
A
[ line ]Deletes the action at the given line; default is the current line. If line is
*
, deletes all line actions.b
[ line [ condition ] ]Sets a breakpoint at line; default is the current line.
b
subname [ condition ]Sets a breakpoint at the named subroutine.
b compile
subnameStops after the subroutine is compiled.
b load
fileSets a breakpoint at requireing the given file.
b postpone
subname [ condition ]Sets a breakpoint at the first line of the subroutine after it is compiled.
B
[ line ]Deletes the breakpoint at the given line; default is the current line. If line is
*
, deletes all breakpoints.c
[ line ]Continues (until line, or another breakpoint, or exit).
f
fileSwitches to file and starts listing it.
h
Prints out a long help message.
h
cmdPrints out help for debugger command cmd.
h h
Prints out a concise help message.
H
[ -number ]Displays the last -number commands.
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 the next screenful.
l
subnameLists the named subroutine.
L
[a
|b
|w ]Lists lines with actions, breakpoints, or watches.
m
classPrints the methods callable via the given class.
m
exprEvaluates the expression in list context, prints the methods callable on the first ...
Get Perl Pocket Reference, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.