EVERYTHING XIAOMI
Get listed

Perl Debugger

Perl Debugger is an interactive debugger included with Perl, not a separate program.

Place
#5 of 27
Score
6.5
Perl Debugger's website

What Perl Debugger is

Perl Debugger is an interactive debugger included with Perl, not a separate program. Running Perl with the `-d` flag loads the debugger and adds source information, letting users inspect code, set breakpoints, view stack backtraces, and change variable values. The program must compile correctly before debugging. Commands can step into subroutine calls, step over them, and trace execution; conditional breakpoints and watches on global expressions can help follow specific changes. The `x` command evaluates an expression and pretty-prints nested data. Displaying lexical variables requires PadWalker version 0.08 or higher. Options can be configured interactively, with `PERLDB_OPTS`, or in `.perldb` files; documentation also describes a GUI option through Devel::ptkdb. The debugger is free and listed for Linux, macOS, and Windows. It cannot provide stack-frame information for functions not compiled by Perl, such as C or C++ extension functions. Compile-time executable statements are not stopped, though some can be traced with AutoTrace.

Good

  • Free and included with Perl
  • Supports conditional breakpoints and global watches
  • Can pretty-print nested data
  • Options can be customized in several ways

Watch out

  • The program must compile correctly first
  • Lexical-variable inspection needs PadWalker 0.08 or higher
  • Cannot show frames for C or C++ extension functions
  • Compile-time executable statements are not stopped

Who it suits

It suits Perl developers who want to inspect and control a running Perl program using breakpoints, stepping, and variable inspection. It is included with Perl and listed for Linux, macOS, and Windows.

Verdict

Perl Debugger provides interactive tools for following Perl execution without a separate debugger program. Its Perl-specific scope and limitations around compile-time code and native extensions are important to consider.

Plans and prices

From Perl Debugger's own pricing page, checked 7 Oct 2026.

All about pricing
PlanPriceWhat it gives you
Perl DebuggerFreeIncluded with Perl; requires the program to compile correctly before debugging

The facts

Each one read from Perl Debugger's own pages, with the date it was checked.

What it does

Breakpoints and watches
Users can set conditional breakpoints and watch global expressions for changes.checked 7 Oct 2026
Built into Perl
The debugger is not a separate program; Perl’s `-d` flag makes the compiler insert source information and preload the debugger library.checked 7 Oct 2026
Compile requirement
The code must compile correctly for the debugger to work on it.checked 7 Oct 2026
Compile-time limit
Compile-time executable statements such as BEGIN, UNITCHECK, CHECK, and use statements are not stopped by the debugger, though some compile-time code can be traced with AutoTrace.checked 7 Oct 2026
Compile-time limitation
Compile-time executable statements such as `BEGIN`, `UNITCHECK`, `CHECK`, and `use` are not stopped by the debugger, though some can be traced with `AutoTrace`.checked 7 Oct 2026
Customizable
Debugger options can be set interactively, through the PERLDB_OPTS environment variable, or in customization files.checked 7 Oct 2026
Customization
Options can be set interactively, through `PERLDB_OPTS`, or in `.perldb` customization files.checked 7 Oct 2026
Editor connections
The LineInfo option provides a mechanism to interact with client editors or visual debuggers, with vi, emacs, and ddd given as examples.checked 7 Oct 2026
GUI option
The documentation describes debugging a program through the Devel::ptkdb GUI using `perl -d:ptkdb`.checked 7 Oct 2026
Inspect and control execution
Debugger commands can examine source code, set breakpoints, show stack backtraces, and change variable values.checked 7 Oct 2026
Inspect values
The x command evaluates an expression and pretty-prints nested data structures recursively.checked 7 Oct 2026
Interactive evaluation
Commands the debugger does not recognize are evaluated as Perl code in the current package.checked 7 Oct 2026
Native extension limitation
The debugger cannot provide stack-frame information or debug functions that were not compiled by Perl, such as C or C++ extension functions.checked 7 Oct 2026
Notable limit
The debugger cannot provide stack-frame information for functions not compiled by Perl, such as those from C or C++ extensions.checked 7 Oct 2026
Optional dependencies
Lexical variable inspection requires PadWalker, and full command-line editing requires Term::ReadKey and a Term::ReadLine module.checked 7 Oct 2026
Project licensing
Perl is open source and is licensed under either the Artistic License or the GNU General Public License.checked 7 Oct 2026
Purpose
The Perl source debugger runs scripts interactively and lets users inspect source, set breakpoints, get stack backtraces, and change variable values.checked 7 Oct 2026
Security detail
The documentation says .perldb may contain arbitrary commands and must be owned by the superuser or current user and writable only by its owner.checked 7 Oct 2026
Stepping and tracing
Commands support single stepping, stepping over subroutine calls, and tracing execution.checked 7 Oct 2026
Step through code
The s command steps into subroutine calls, while n executes over them to the next statement.checked 7 Oct 2026
Support
The download page points learners to learn.perl.org and the Perl Community for help.checked 7 Oct 2026
Threaded debugging
The `-dt` invocation debugs a threaded program and is marked experimental.checked 7 Oct 2026
Variable inspection
The debugger can pretty-print nested data and display package variables; lexical-variable display requires PadWalker version 0.08 or higher.checked 7 Oct 2026

Where it runs

Platform availability
The Perl download page lists Perl as included on Unix/Linux and macOS, and provides a Windows option through Strawberry Perl.checked 7 Oct 2026
The full review of Perl Debugger

Overview

Perl Debugger is an interactive source debugger invoked from Perl itself, best suited to developers tracing scripts and inspecting runtime state. It is a practical, no-cost choice for Perl code that compiles, but it is not a debugger for every phase of execution or for native extension code.

Key features

Run a script with Perl’s -d flag to load the debugger alongside the source information Perl inserts. From the prompt, developers can inspect source, view stack backtraces, change variable values, and set conditional breakpoints. The s command enters subroutine calls; n advances past them to the next statement. Tracing is also supported. This gives Perl developers useful control without a separate debugger program, though debugging cannot begin until the code compiles correctly.

Global watch expressions pause execution when a watched value changes and show its previous and new values. The x command evaluates an expression and recursively prints nested data, while package variables can be displayed. Lexical-variable inspection requires PadWalker version 0.08 or higher, a meaningful extra requirement for developers whose investigations depend on lexical state.

Unrecognized commands are treated as Perl code in the current package, making the prompt flexible for users comfortable with the language. Options can be set interactively, through PERLDB_OPTS, or in .perldb files. Because those files can execute arbitrary commands, they must be owned by the superuser or current user and writable only by their owner. Full command-line editing requires Term::ReadKey and a Term::ReadLine module. The LineInfo option can connect with editors or visual debuggers such as vi, emacs, and ddd; a GUI debugging route is also documented through Devel::ptkdb.

Pricing

Perl Debugger costs nothing and is included with Perl. There is no paid tier or free trial; the important qualification is functional rather than commercial: the program must compile before the debugger can work. Threaded programs can be invoked with -dt, but threaded debugging is experimental.

Platforms

Perl Debugger is available on Linux, macOS, and Windows through Perl. Perl is included on Unix/Linux and macOS, while Strawberry Perl provides a Windows option. Its debugger is part of the Perl environment rather than a standalone application.

Who it's for

This is a good fit for Perl developers who need source-level stepping, conditional breakpoints, watches, and inspection of runtime data without adopting another debugger. It is less suitable when the target is compile-time behavior: executable statements in BEGIN, UNITCHECK, CHECK, and use are not stopped, although some can be traced with AutoTrace. Nor can it provide stack-frame information or debug functions not compiled by Perl, including C and C++ extension functions. It also does not currently work with Perl’s -W switch.

Pros and cons

  • Pros: Included with Perl at no additional cost, with stepping, conditional breakpoints, watches, backtraces, and nested data inspection in one interactive workflow.
  • Pros: Unrecognized commands run as Perl in the current package, useful for developers who want to inspect state with the language itself.
  • Cons: Lexical inspection depends on PadWalker, and full command-line editing needs additional modules.
  • Cons: Compile-time execution and native extension functions fall outside its debugging reach; the -W switch is also unsupported.

Alternatives

For a broader free debugger across platforms, consider GDB, whose source code is available under the GNU General Public License. LLDB is another free, open-source option spanning mobile and desktop platforms. If the work is x86 disassembly rather than Perl source debugging, IDA Pro offers a free tier with x86-32 and x86-64 disassembly and two cloud-based decompilers, alongside a paid Essential plan at 1099.00 USD. For embedded microcontrollers, Black Magic Debug is a free JTAG/SWD debugger, but requires compatible probe hardware and a suitable toolchain. pyOCD is a free open-source project; OpenOCD is free open-source software distributed through operating-system packages or source. PonyDebugger is a free Apache License 2.0 option with an iOS client and gateway server, while FlowStorm is free and open source.

Browse more options in Debuggers.

Verdict

Choose Perl Debugger if you work in Perl and want built-in, interactive control over ordinary script execution without paying for a separate debugger. Its focused workflow is useful, but compile-time code, native extensions, and dependence on optional modules for some inspection tasks are good reasons to look elsewhere when those are central to the job.

Getting started

  1. Open the Perl debugger documentation website
  2. Install Perl for Linux, macOS, or Windows
  3. Ensure the Perl program compiles correctly
  4. Run the program with Perl’s `-d` flag
  5. Use debugger commands to step, inspect, and set breakpoints
  6. Add PadWalker when lexical-variable inspection is needed

Limits worth knowing

The program must compile before debugging. Compile-time executable statements such as BEGIN, UNITCHECK, CHECK, and use are not stopped normally, and functions not compiled by Perl do not provide stack-frame information.

Questions

What does Perl Debugger cost?

The listed Perl Debugger plan is free, and it is included with Perl.

Which platforms are supported?

Perl is listed for Linux, macOS, and Windows, with Windows available through Strawberry Perl.

Does it support conditional breakpoints?

Yes. Conditional breakpoints can pause execution when their condition is met.

Can it inspect lexical variables?

Yes, with PadWalker version 0.08 or higher.

Is there a graphical interface?

The documentation describes using the Devel::ptkdb GUI through `perl -d:ptkdb`.

Is Perl Debugger open source?

Perl is licensed under either the Artistic License or the GNU General Public License.

Alternatives to Perl Debugger

All alternatives
  1. 1

    LLDB

    Free planAndroidiOSLinuxmacOS
    7.3Free plan
  2. 2IDA Pro logo

    IDA Pro

    Free planLinuxmacOSWindows
    7.0From $1,099 a year
  3. 3

    PonyDebugger

    Free planiOSWebmacOSSelf-hosted
    6.8Free plan
  4. 4

    pyOCD

    Free planAPILinuxmacOSSelf-hosted
    6.8Free plan
  5. 5Black Magic Debug logo

    Black Magic Debug

    Free planLinuxmacOSWindows
    6.4Free plan
  6. 6

    FLEX

    Free planiOS
    6.4Free plan