Main Navigation

Content

Debugging Perl Programs

Learn Perl Now!
And get a job doing Perl.

Introduction

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

Devel-Trace

Allows one to print each line before it is executed.

Devel-LineTrace

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

Devel-Trepan

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

Share/Bookmark

Sidebar

Footer