开发者

What's the debugger for Perl?

开发者 https://www.devze.com 2023-03-09 00:52 出处:网络
I came from PHP, and I used zenddebugger to debug PHP. How can I d开发者_运维技巧ebug Perl?Using the built-in Perl debugger:

I came from PHP, and I used zenddebugger to debug PHP.

How can I d开发者_运维技巧ebug Perl?


Using the built-in Perl debugger:

perldoc perldebug


While Jonathan's answer is optimal, using the strict and warning pragmas:

use strict;
use warnings;

Will help you catch the majority of your errors if you aren't already using them.


Here is my debugging tip recycled from perlmonks.

Let the debugger automatically stop program execution whenever a warning is issued from the Perl runtime system. So you can look at the context of the problem and investigate.

This node is giving the motivation and here it is in its final form.


In any way you choose, don't forget to add Data::Dumper to your debugging routines.


Devel::Peek is a good data debugging tool.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号