NAME

Devel::PDB - A simple Curses-based Perl DeBugger

SYNOPSIS

    perl -d:PDB foo.pl

DESCRIPTION

PerlDeBugger is a Curses-based Perl debugger with most of the essential functions such as monitoring windows for paddlist, call stack, custom watch expressions, etc. Suitable for debugging or tracing complicated Perl applications on the spot.

  File  View  Execution  Breakpoint  Settings  Help                              
  a.pl:5 ---------------------------------------------------------------------- 
|  use Devel::PDB;                                                             |
|  #!/usr/bin/perl                                                             |
|                                                                              |
|                                                                              |
|  my $a = test();                                                             |
|  print "$a\n";                                                               |
|                                                                              |
|  sub test {                                                                  |
|        my $hey = 10;                                                         |
|        my $guys_this_is_long = 20;                                           |
|        test2();                                                              |
|        2;                                                                    |
|  }                                                                           |
|                                                                              |
|  sub test2 {                                                                 |
 ------------------------------------------------------------------------------ 
  Auto --------------------------------   Watch ------------------------------- 
|$a                   undef            ||- no values -                         |
|                                      ||                                      |
|                                      ||                                      |
|                                      ||                                      |
 --------------------------------------  -------------------------------------- 

FUNCTIONS

PerlDeBugger currently can:

  • step-over, step-in, step-out, run

  • set/remove breakpoint

  • Evaluate breakpoint

  • automatic display of lexical variables

  • add/remove custom watch expression

  • show/open compiled files

  • Stack Trace Window

  • Immediate Window for executing arbitrary perl statement

  • Other functionalities

KYES BINDING - standart key

Global
WindowSource - F1

Switch to the Source Code Window

WindowLexical - F2

Switch to the Lexical Variable Window

WindowWatches - F3

Switch to the Watch Window

ViewSTDFile - F4

Views STDOUT or STDERR file

Continue - F5

Continue execution

StepOut - F6

Step Out

StepIn - F7

Step In

SteOver - F8

Step Over

Breakpoint - F9

Toggle Breakpoint. Set or remove breakpoint on cursor position.

Open main - top menu

FilesCompiled - F11

Show 'Compiled Files' Dialog

FilesOpened - F12

Show 'Opened Files' Dialog

Quit - Ctrl+Q, Ctrl+C

Quit the debugger

BreakpointCode - Ctrl+O

Add/Edit/Remove breakpoint with condition on given line. Can be also removed by F9 - Breakpoint

Refresh - Ctrl+N

Refresh all window contents

Export - Ctrl+Y

Export information to file from actual source and stack variables or watches

WatchExpression - Ctrl+W

Add watch expression

Restart - Ctrl+R

Restart program

RunCommand - Ctrl+P

Add commands to runned perl script

Arguments - Ctrl+A

View arguments(parameters) of runned program

ArgumentsEdit - Ctrl+E

Edit arguments(parameters) of runned program

EnviromentsEdit - Ctrl+M

Edit enviroments

Filebrowser - Ctrl+F

Find Perl module and load this module

WindowStack - Ctrl+T

View stack of runned program

ConfigSave - Ctrl+S

Save breakpoints and watches to config file

ConfigSave - Ctrl+L

Load breakpoints and watches from config file

ViewVariables - Ctrl+U

View special variables

ListBreakpoints - Ctrl+B

List all breakpoints in files and position

ClearBreakpoints -

Clear all breakpoints

ClearWatches -

Clear all watches

ClearAll - Ctrl+X

Clear all settings (breakpoints and watches)

VerticalPartsMin - {

Minimized window in vertical size

VerticalPartsMax - }

Maximized window in vertical size

HorizontalPartsMin - [

Minimized window in horizontal size

HorizontalPartsMax - ]

Maximized window in horizontal size

Source Code Window
UP/DOWN/LEFT/RIGHT/PAGE UP/PAGE DOWN

Move the cursor

H/J/K/L/Ctrl+F/Ctrl+B

If you use VI, you will know

/

Search using a RegEx in the current opened file

n

Search Next

N

Search Previous

Ctrl+G

Goto a specific line

Lexical Variable Window / Watch Window
UP/DOWN

Move the cursor

ENTER

Show the Data::Dumper output of the highlighted item in a scrollable dialog

DEL

Remove the highlighted expression (Watch Window only)

Compiled File Dialog / Opened File Dialog
TAB

Toggle the focus between the file list and the filter

ENTER

Select the highlighted file or apply the filter to the file list

F6, Ctrl+S, Ctrl+L

Export everything from window to given file

Config files

Files will be created in directory when program is run . If in enviroment exist PDB_use_HOME than everything is created into ~/.PDB directory. Every file begin with program name and continue with:

-conf

Configuration files of saved brakpoints and watches

-[stdout|stderr]

Output standart STD files from runned program

~/.PDB.keys

Configuration files of rebinded keys. For function keys is FX and for Cotrol keys is Control-X.

For example keys 'F10' for open Menu and keys 'Ctrl+C','Ctrl+Q','Q' for Quit.

Menu=F10 Quit=Control-C,Control-Q,Q

~/.PDB.colours

Configuration of own colours as defined in Curses::UI::Color. Each line has one definition, where frst is key and second is colour with space separattor.

For example set general foreground and background color as RED on WHITE:

-fg red -bg white

SEE ALSO

perldebug

AUTHORS

Ivan Yat-Cheung Wong <email (at) ivanwong.info>

Igor Bujna <igor.bujna (at) post.cz>

COPYRIGHT AND LICENSE

Copyright (C) 2007 by Ivan Y.C. Wong, Igor Bujna

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.