Main Navigation


Debugging Perl Programs

Learn Perl Now!
And get a job doing Perl.


There are several ways to debug Perl programs, to find the cause of bugs, and to find a good solution for them. Many Perl beginners don't make use of the Perl's debuggers, such as the -d flag or the various Devel:: modules. This is unfortunate because they are very convenient and can save a lot of time.

Debugging Resources

perldebtut - the Perl debugging Tutorial

Covers the default perl -d debugger.

Perl for Perl Newbies Series

The material of the second presentation contains a brief introduction to using the perl -d Debugger.

Debugging Aids


Allows one to print each line before it is executed.


Allows one to assign code to be executed on individual lines in the program. This allows to use it instead of adding print's to the code, which later need to be removed.

Graphical Debugger Front-ends

While not full-fledged IDEs, these tools are useful as graphical debugger front-ends.

Enhanced Debuggers


An enhanced debugger for Perl, which, while originally derived from, broke internal and external compatibility with the aim of making Trepan easier to use.