The Perl Debugger
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]
- Repeats last s or n.
- r
- Returns from the current subroutine.
- c [ line ]
- Continues (until line, or another breakpoint, or exit).
- p expr
- Prints expr.
- 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.
- 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
- Lists the names of all subroutines.
- /pattern/
- Searches forward for pattern.
- ?pattern?
- Searches backward for pattern.
- 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 character.
- command
- Executes command as a Perl statement.