++ed by:
ZMUGHAL NGLENN HIDEAKIO THALJEF GARU

6 PAUSE users
7 non-PAUSE users.

Rocky Bernstein

NAME

Devel::Trepan -- A new Perl debugger

SUMMARY

A modular, testable, gdb-like debugger in the family of the Ruby trepanning debuggers.

Features:

extensive online-help
syntax highlighting of Perl code
context-sensitive command completion
out-of-process and remote debugging
interactive shell support
code disassembly
gdb syntax
easy extensibility at several levels: aliases, commands, and plugins
comes with extensive tests
is not as ugly as perl5db

Some of the features above require additional modules before they take effect. See "Plugins" and "Recommended Modules" below.

DESCRIPTION

From a shell:

    $ trepan.pl [trepan-opts] -- perl-program [perl-program-opts]

Or for those who prefer the traditional Perlish way:

    $ perl -d:Trepan perl-program [perl-program-opts]

Calling the debugger from inside your Perl program using Joshua ben Jore's Enbugger:

    # This needs to be done once and could even be in some sort of 
    # conditional code
    require Enbugger; Enbugger->load_debugger( 'trepan' );
    # Alternatively, to unconditionally load Enbugger and trepan:
    use Enbugger 'trepan';

    # work, work, work...
    # Oops! there was an error! Enable the debugger now!
    Enbugger->stop;  # or Enbugger->stop if ... 

Or if you just want POSIX-shell-like set -x line tracing:

    $ trepan.pl -x -- perl-program [perl-program-opts]

Inside the debugger tracing is turned on using the command set trace print. There is extensive help from the help command.

BUGS/CAVEATS

Because this should be useful in all sorts of environments such as back to perl 5.008, we often can make use of newer Perlisms nor can we require by default all of the modules, say for data printing, stack inspection, or interactive terminal handling. That said, if you have a newer Perl or the recommended modules or install plugins, you'll get more.

Although modular, this program is even larger than perl5db and so it loads a little slower. I think part of the slowness is the fact that there are over 70 or so (smallish) files (rather than one nearly 10K file) and because relative linking via rlib is used to glue them together.

AUTHOR

Rocky Bernstein

SEE ALSO

My Devel::Trepan blogs and wiki

On writing a new Perl Debugger (Part 1 - Why?)
Devel::Trepan Debugger command aliases and command completion
Devel::Trepan Debugger evaluation of Perl statements
Location, Location, Location
Devel::Trepan github wiki

Plugins

Devel::Trepan::Shell

Adds a debugger shell command support via Devel::REPL

Devel::Trepan::Disassemble

Adds a debugger disassemble command support via B::Concise

Enbugger

Allows you to enter the debugger via a direct call in source code

Eval::WithLexicals

Allows you to inspect my and our variables up the call stack

Data::Printer

Allows one to Use Data::Printer to format evaluation output

Data::Dumper::Perltidy

Allows one to Use Data::Dumper::Perltidy to format evaluation output

Term::ReadLine::Perl

Allows editing on the command line and command completion. This Module is preferred over Term::ReadLine::Gnu.

Term::ReadLine::Gnu

Allows editing of the command line and command completion

Allows one to Use Data::Dumper::Perltidy to format evaluation output

Other Debuggers

perldebug

Perl's built-in tried-and-true debugger that other debuggers will ultimately be compared with

Devel::ebug
DB

Somewhat abandoned debugger API interface. I've tried to use some parts of this along with perl5db.

COPYRIGHT

Copyright (C) 2011, 2012 Rocky Bernstein <rocky@cpan.org>

This program is distributed WITHOUT ANY WARRANTY, including but not limited to the implied warranties of merchantability or fitness for a particular purpose.

The program is free software. You may distribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (either version 2 or any later version) and the Perl Artistic License as published by O'Reilly Media, Inc. Please open the files named gpl-2.0.txt and Artistic for a copy of these licenses.