This debug adapter invokes perl -d and handles communication with VS Code.
It should work out of the box on Linux, Windows and Mac using VS Code. It also works inside Microsofts Remote Extensions Remote-SSH, Remote-WSL and Remote-Containers.
- Install the Perl5 Debug Adapter extension in VS Code.
- Perl needs to be installed and the path of the perl executable either needs to be available inside the $PATH environment variable or be provided via the launch.json configuration file.
- The PadWalker module needs to be available in your environment.
- OPTIONAL I recommend using this extension together with BSCANs Perl Navigator as it provides great language server features out of the box.
As this extension implements the Debug Adapter Protocol it should be usable with other editors and IDEs aswell. Feel free to try it out and report any bugs that may occur.
Build dependencies:
Runtime dependencies:
To build (on Linux), clone this repository and run the following in the root of the repository:
npm install
npm run compile
The adapter can then be invoked with
node -- out/debugAdapter.js
To manually install this package, run the build steps above, then
prefix="/usr/local" # or wherever you want
npm install -g --install-links \
--prefix "$prefix"
# Make sure that users can traverse to read the js being run
find "$prefix/lib/node_modules/perl-debug-adapter" \
-type d -execdir chmod 755 '{}' +
# Replace the (broken) executable generated by npm with a wrapper script
rm "$prefix/bin/perl-debug-adapter"
cat <<EOF >"$prefix/bin/perl-debug-adapter"
#!/bin/sh
exec node -- "$prefix/lib/node_modules/perl-debug-adapter/out/debugAdapter.js" "$@"
EOF
chmod 755 "$prefix/bin/perl-debug-adapter"
then the adapter can be invoked with just
perl-debug-adapter
if $prefix/bin
is in your PATH
.