# Perl script debugging
# Run script in debug mode
To run script in debug mode you should add -d
option in the command line:
$perl -d script.pl
If t
is specified, it indicates to the debugger that threads will be used in the code being debugged:
$perl -dt script.pl
Additional info at perldoc
perlrun (opens new window)
# Use a nonstandard debugger
$perl -d:MOD script.pl
runs the program under the control of a debugging, profiling, or tracing module installed as Devel::MOD
.
For example, -d:NYTProf
executes the program using the Devel::NYTProf
profiler (opens new window).
See all available Devel modules (opens new window) here
Recommended modules:
Devel::NYTProf
(opens new window) -- Powerful fast feature-rich Perl source code profilerDevel::Trepan
(opens new window) -- A modular gdb-like Perl debuggerDevel::MAT
(opens new window) -- Perl Memory Analysis ToolDevel::hdb
(opens new window) -- Perl debugger as a web page and REST serviceDevel::DebugHooks::KillPrint
(opens new window) -- Allows to forget about debugging byprint
statementDevel::REPL
(opens new window) -- A modern perl interactive shellDevel::Cover
(opens new window) -- Code coverage metrics for Perl