Skip to Main Content
Perl Pocket Reference, 5th Edition
book

Perl Pocket Reference, 5th Edition

by Johan Vromans
July 2011
Intermediate to advanced content levelIntermediate to advanced
104 pages
2h 14m
English
O'Reilly Media, Inc.
Content preview from Perl Pocket Reference, 5th Edition

Appendix B. The Perl Debugger

The Perl symbolic debugger is invoked with perl -d. The command perl -de 0 is a good way to play with Perl and the debugger.

Upon startup, the debugger will try to read settings and initial commands from a file .perldb (perldb.ini on Windows) in the current directory or, if not found, in the home directory.

Any input to the debugger that is not one of the commands enumerated below is evaluated as a Perl expression.

a [ line ] command

Sets 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 subname

Stops after the subroutine is compiled.

b load file

Sets 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 file

Switches to file and starts listing it.

h

Prints out a long help message.

h cmd

Prints 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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl Testing: A Developer's Notebook

Perl Testing: A Developer's Notebook

Ian Langworth, Chromatic
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe

Publisher Resources

ISBN: 9781449311186Errata Page