I came from PHP, and I used zenddebugger to debug PHP.
How can I debug Perl?
In Perl, the debugger is not a separate program the way it usually is in the typical compiled environment. Instead, the -d flag tells the compiler to insert source information into the parse trees it's about to hand off to the interpreter.
From the VS Marketplace plugin page download the extension with the "Download Extension" link on the right hand side. Open a Perl source file, click "Run -> Start Debugging" or hit F5 and observe there is no error as before. Now explore all VSCocde IDE functions working nicely with 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With