Reputation: 17615
I came from PHP, and I used zenddebugger to debug PHP.
How can I debug Perl?
Upvotes: 6
Views: 233
Reputation: 679
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.
Upvotes: 6
Reputation: 8895
In any way you choose, don't forget to add Data::Dumper
to your debugging routines.
Upvotes: 1
Reputation: 1220
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.
Upvotes: 5