perl -d target.pl args Uses readline ^a beginning, ^end (EMACS)
List/search source lines: Control script execution:
l [ln|sub] List source code c [ln|sub] Continue until ln|sub
- or . List previous|current line s [expr] single step [in expr]
v [ln] view around ln n [expr] next, steps over subs
f filename View source in file ␍ [Enter] Repeat last n or s
/pattern
?pattern
Search forward
backward
r Return from subroutine
b [ln|event|sub] [cmd]Set breakpoint
default current line
Data Examination: B ln|* remove Breakpoint | all
p expr prints expr
(uses script's current package).
a [ln] cmd at(before) ln do cmd
x expr Evals expr in list context, dumps the result A ln | * remove actions at ln or all
m expr Evals expr in list context, lists methods. t [expr] Toggle trace
= [a val] Define/list an alias
= [alias val] Define/list an alias
w expr add a watch expression L List break/watch/actions
W expr | * remove a/all watch exprs inhibit_exit='1'
expr Execute perl code, T stack trace
X vars lists Varables as
"V current_package [vars]".
V Pkge [vars] List Variables in Pkge vars
can be ~pattern or !pattern.
Restart
y n [vars] List lexicals in higher scope .
vars same as V.
quit or ^d
S [!]pat List subroutines [not] matching pat. sample
example: S main
![!] syscmd Run syscmd in a subprocess o […] Set debugger options
<[<]|{[{] [cmd] Do pre-prompt >[>] [cmd] Do post-prompt
! [N|pat] Redo a previous command
H [-n] Display last n commands
|[|]dbg_cmd Send output to pager
M Show module versions sample
R Restart Pure-man-restart of debugger,
Only history, breakpoints and actions, options and -w, -I, -e state and command-line options are preserved:
h [dbg_cmd] Get help on command h h Complete help page

For more help, type h cmd_letter, or run man perldebug for all docs. opt … Set boolean option to true
opt? Query options
opt=val [opt="val"] …
Set options. Use quotes with spaces in value.
recallCommand, ShellBang chars used to recall command or spawn shell
pager program for output of "|cmd" default: more
tkRunning run Tk while prompting (with ReadLine)
inhibit_exit Don't exit Debugger when script exits
ImmediateStop Debugger should stop as early as possible.
RemotePort Remote hostname:port for remote debugging
signalLevel warnLevel dieLevel level of verbosity
affect V, X, and x :
arrayDepth, hashDepth output only first N elements ('' for all)
compactDump| veryCompact style of array and hash dump
globprint output contents of globs/or not
DumpDBFiles dump arrays holding debugged files
DumpPackages dump symbol tables of packages
DumpReused dump contents of "reused" addresses
quote| HighBit| undefoutput style of string dump
bareStringify Do not output the overload-stringified value
printRet outputing of return value after reset
frame outputing messages on subroutine entry/exit.
AutoTrace outputing messages on possible breaking points.
maxTraceLen gives max length of evals/args listed in stack trace.
ornaments screen appearance of the command line.
Termcap data
Prompt highlight:us,ue,inputline highlight:md,me
CreateTTY bits control attempts to create a new TTY on events:
1: on fork()
2: debugger is started inside debugger
4: on startup

Options initialized from Environment Variable $PERLDB_OPTS.
Additional initialization options TTY, noTTY, ReadLine, NonStop, and RemotePort there (or use R after set ).

Set $DB::finished = 0 to debug global destruction.

Options

CommandSet='580'
hashDepth= arrayDepth=

dumpDepth=
DumpDBFiles= DumpPackages= DumpReused=
compactDump= veryCompact=
quote=
HighBit=
undefPrint= globPrint=
PrintRet='1'
UsageOnly=
frame='0'
AutoTrace='1'
UsageOnly=
ReadLine='1'
NonStop='0'
LineInfo='/dev/tty'
maxTraceLen='400'
recallCommand='!'
ShellBang='!'
pager='|less'
tkRunning=
orments='us,ue,md,me'

siglLevel='1' 
warnLevel='1' 
dieLevel='1'

inhibit_exit='1'
ImmediateStop=
bareStringify=
TTY='/dev/tty'
noTTY=
CreateTTY='3'
RemotePort=
windowSize='10'
CreateTTY=3
windowSize=10
rearranged ed
  DB<5> 
V
$, = ''        $" = ' '            $| = 1    $% = 0         $< = 1010   $\ = ''      $= = 60
$: = ' 
-'
$/ = '
'
$- = 0
@- = (
   0  empty slot
   1  empty slot
   2  empty slot
)

$^ = 'OUT_TOP'
$^A = ''       $^D = 0                                 $^F = 2             $^L = "\cL"
$^P = 831      $^E = 'Invalid argument'                $^H = 256
$^W = 0
$~ = 'OUT'
$^TAINT = 0
$^O = 'linux'
@_ = (
   0  0
   1  '_'
   2  *main::_
   3  0
   4  '-1'
)

$+ = ''
@+ = (
   0  empty slot
   1  empty slot
   2  empty slot
)
$^X = '/usr/bin/perl'
$^UNICODE = 0
$^WARNING_BITS = "\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@\c@"      aka 00000000
FileHandle(STDIN) => fileno(0)   FileHandle(stdout) => fileno(1)  FileHandle(STDERR) => fileno(2)         
FileHandle(stdin) => fileno(0)   FileHandle(STDOUT) => fileno(1)  FileHandle(stderr) => fileno(2)
$1 = 'main'
%ENV = (
…
   'DBI_DRIVER' => 'mysql'       'DBI_DSN' => 'DBI:mysql:realger1_moodle' 'DBI_PASS' => 'birding'
   'DBI_USER' => 'realger1_observr'
…
   'PATH' => '/home2/realger1/.bin:/home2/realger1/perl5/bin:/usr/kerberos/bin:
            /usr/local/bin:/bin: /usr/bin:/usr/libexec'
   'PERL5LIB' => '/home2/realger1/perl5/lib/perl5:'
   'PERLDB_PIDS' => 745875
   'PERL_LOCAL_LIB_ROOT' => ':/home2/realger1/perl5'
   'PERL_MB_OPT' => '--install_base /home2/realger1/perl5'
   'PERL_MM_OPT' => 'INSTALL_BASE=/home2/realger1/perl5'
…
   '_' => '/usr/local/bin/perl'
…
)


%SIG = (
 ABRT => undef            ALRM => undef
 BUS => CODE(0xfc41830)
 -> &CODE(0xfc41830) in ???
 CHLD => undef            CLD => undef  CONT => undef
 FPE => IGNORE
 HUP => undef             ILL => undef
 INT => CODE(0xfc0e430)
  -> &DB::catch in 0
  IO => undef             IOT => undef    KILL => undef
  NUM32 => undef
…
  NUM63 => undef
  PIPE => undef           POLL => undef   PROF => undef
   PWR => undef           QUIT => undef   RTMAX => undef
   RTMIN => undef
   SEGV => CODE(0xfc41830)
      -> REUSED_ADDRESS
   STKFLT => undef        STOP => undef   SYS => undef
   TERM => undef          TRAP => undef   TSTP => undef
   TTIN => undef          TTOU => undef   UNUSED => undef
   URG => undef           USR1 => undef   USR2 => undef
   VTALRM => undef
   WINCH => readline::get_window_size
   XCPU => undef
   XFSZ => undef
   __DIE__ => CODE(0xfc41c80)     __WARN__ => CODE(0xfc41a70)
      -> &DB::dbdie in 0          -> &DB::dbwarn in 0
)
℘ == /usr/lib/perl5/5.8.8/
%INC = (
   AutoLoader.pm      => /usr/lib/perl5/5.8.8/AutoLoader.pm
   Carp.pm            => /usr/lib/perl5/5.8.8/Carp.pm
   Carp/Heavy.pm      => /usr/lib/perl5/5.8.8/Carp/Heavy.pm
   Exporter.pm        => /usr/lib/perl5/5.8.8/Exporter.pm
   SelectSaver.pm     => /usr/lib/perl5/5.8.8/SelectSaver.pm
   SelfLoader.pm      => /usr/lib/perl5/5.8.8/SelfLoader.pm
   Symbol.pm          => /usr/lib/perl5/5.8.8/Symbol.pm
   Term/Cap.pm        => /usr/lib/perl5/5.8.8/Term/Cap.pm
   Term/ReadLine/Perl.pm     => /usr/lib/perl5/site_perl/5.8.8/Term/ReadLine/Perl.pm
   Term/ReadLine/readline.pm => /usr/lib/perl5/site_perl/5.8.8/Term/ReadLine/readline.pm

   Term/ReadLine.pm   => /usr/lib/perl5/5.8.8/Term/ReadLine.pm
   attributes.pm      => /usr/lib/perl5/5.8.8/attributes.pm
   dumpvar.pl         => /usr/lib/perl5/5.8.8/dumpvar.pl
   perl5db.pl         => /usr/lib/perl5/5.8.8/perl5db.pl
   strict.pm          => /usr/lib/perl5/5.8.8/strict.pm
   vars.pm            => /usr/lib/perl5/5.8.8/vars.pm
   warnings.pm        => /usr/lib/perl5/5.8.8/warnings.pm
   warnings/register.pm => /usr/lib/perl5/5.8.8/warnings/register.pm

   XSLoader.pm        => ℘/5.8.8/x86_64-linux-thread-multi/XSLoader.pm
   Term/ReadKey.pm    => ℘/site_perl/5.8.8/x86_64-linux-thread-multi/Term/ReadKey.pm
   Config.pm          => ℘/5.8.8/x86_64-linux-thread-multi/Config.pm
   Devel/Peek.pm      => ℘/5.8.8/x86_64-linux-thread-multi/Devel/Peek.pm
   DynaLoader.pm      => ℘/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm
   IO.pm              => ℘/5.8.8/x86_64-linux-thread-multi/IO.pm
   IO/Handle.pm       => ℘/5.8.8/x86_64-linux-thread-multi/IO/Handle.pm
)

@INC = (
   0  /home2/realger1/perl5/lib/perl5
   1  ℘/site_perl/5.8.8/x86_64-linux-thread-multi
   2  /usr/lib/perl5/site_perl/5.8.8
   3  /usr/lib/perl5/site_perl
   4  ℘/vendor_perl/5.8.8/x86_64-linux-thread-multi
   5  /usr/lib/perl5/vendor_perl/5.8.8
   6  /usr/lib/perl5/vendor_perl
   7  ℘/5.8.8/x86_64-linux-thread-multi
   8  /usr/lib/perl5/5.8.8
   9  .
)