I am trying to get VSCode working with Perl on my W11 machine using WSL2. VSCode is installed and running. I finally got Perl::LanguageServer installed. When I open a perl script in VSCode it does not recognize it as executable, i.e. there is no run icon at the top right of the window like there is for python. I think maybe it doesn’t know where to find the interpreter. ChatGPT tells me I should install config info
{
"perl": {
"perlCmd": "/usr/bin/perl",
"perlInc": [],
"enable": true,
"lintCmd": "perl -c",
"includePaths": [],
"fileExtensions": [".pl", ".pm", ".t"],
"ignoreDirs": [".vscode", "node_modules"],
"logLevel": 2,
"showDocPath": true
},
"perl-toolbox.perl-path": "/usr/bin/perl",
"perlcritic.enable": true
}
In Preferences: Open Settings (UI). But there is no such file, only Open User Settings (UI). I put the above in there and restart VS Code. It still does not see to recognize .pl as executable.
When I try to use run & debug on the left menu it says “you don’t have an extension for debugging Perl. Should we find one in the Marketplace?” But Perl::LanguageServer is supposed to include debugging. So something is still not configured right.
Can someone point me in the right direction?