richterger / Perl-LanguageServer

Language Server for Perl
Other
224 stars 51 forks source link

Installed in VSCode, but not executing/degigging #211

Open networks1 opened 2 months ago

networks1 commented 2 months ago

After quite a bit of trying I got this mod and its extensions installed on WSL2/Ubuntu. Set it up as an extension for VSCode, which confirms that it is installed. I set a breakpoint on the second line of

use feature ":5.10";
my $foo = "This is a test.";
say foo;

then hit run and debug. The little progress bar above the run and debug button makes one cycle across the top, then goes away. It doesn't execute the script or stop at the breakpoint. No error messages. I checked the log and extensions log folders, and there is nothing in there that looks off.

Any idea how to fix this? I feel like I'm so close!

orajab commented 1 month ago

I had the same issue when check the output I found that Debugger failed to exectue the code with permission denied to create a work around I did the following : 1- Create the Wrapper Script: sudo nano /usr/local/bin/sudo-perl 2- Add the following content to the script: #!/bin/bash sudo /usr/bin/perl.orig "$@" 3- Make the Wrapper Script Executable: sudo chmod +x /usr/local/bin/sudo-perl 4-Backup the Original Perl Interpreter: sudo mv /usr/bin/perl /usr/bin/perl.orig 5-Create a Symbolic Link to the Wrapper Script: sudo ln -s /usr/local/bin/sudo-perl /usr/bin/perl now I'm able to run the debugger note : make sure your user is added to sudoers

networks1 commented 1 month ago

@orajab thanks. Line 4 should be cp rather than mv, correct?