Perl Language

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

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.

See all available Devel modules here

Recommended modules:


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow