richterger / Perl-LanguageServer

Language Server for Perl
Other
224 stars 53 forks source link

problem with debugger can't locate Perl/LanguageServer/DebuggerInterface.pm #13

Closed slymz closed 4 years ago

slymz commented 4 years ago

I have   Perl (v5.20.2) . Followed the usual route to install cpan Perl::LanguageServer. Everything builds and installs fine.  Perl::LanguageServer::DebuggerInterface is installed and exists.

LanguageServer loads fine on VS Code.  Code browsing and everything works as expected and smoothly. 

But with the debugger I am getting:

Can't locate Perl/LanguageServer/DebuggerInterface.pm in @INC (you may need to install the Perl::LanguageServer::DebuggerInterface module) (@INC contains: /hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/site_perl/5.20.2/x86_64-linux-thread-multi /hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/site_perl/5.20.2 /hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/5.20.2/x86_64-linux-thread-multi /hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/5.20.2 .).
BEGIN failed--compilation aborted.

My launch.json is straightforward:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "perl",
            "request": "launch",
            "name": "foobar",
            //"program": "${workspaceFolder}/${relativeFile}",
            "program": "${workspaceFolder}/tools/foo.pl",
            "stopOnEntry": true,
            "reloadModules": true
        }
    ]
}

Any ideas?

VSCode version: 1.44.0-insider

richterger commented 4 years ago

This look like a problem with your Perl include path. Could you double check that it is really installed in one of the directories listed below after @INC contains

Von: slymz [mailto:notifications@github.com] Gesendet: Donnerstag, 12. März 2020 20:05 An: richterger/Perl-LanguageServer Perl-LanguageServer@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Betreff: [richterger/Perl-LanguageServer] problem with debugger can't locate Perl/LanguageServer/DebuggerInterface.pm (#13)

I have Perl (v5.20.2) . Followed the usual route to install cpan Perl::LanguageServer. Everything builds and installs fine. Perl::LanguageServer::DebuggerInterface is installed and exists.

LanguageServer loads fine on VS Code. Code browsing and everything works as expected and smoothly.

But with the debugger I am getting:

Can't locate Perl/LanguageServer/DebuggerInterface.pm in @INC (you may need to install the Perl::LanguageServer::DebuggerInterface module) (@INC contains: /mathworks/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/site_perl/5.20.2/x86_64-linux-thread-multi /mathworks/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/site_perl/5.20.2 /mathworks/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/5.20.2/x86_64-linux-thread-multi /mathworks/hub/share/apps/BuildTools/Linux/glibc-2.13/x86_64/perl/perl-5.20.2-mw-026/lib/5.20.2 .).

BEGIN failed--compilation aborted.

My launch.json is straightforward:

{

// Use IntelliSense to learn about possible attributes.

// Hover to view descriptions of existing attributes.

// For more information, visit: 

https://go.microsoft.com/fwlink/?linkid=830387 https://urlsand.esvalabs.com/?u=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3Flinkid%3D830387&e=09b421e4&h=ed1ae1d0&f=y&p=y

"version": "0.2.0",

"configurations": [

    {

        "type": "perl",

        "request": "launch",

        "name": "foobar",

        //"program": "${workspaceFolder}/${relativeFile}",

        "program": "${workspaceFolder}/tools/foo.pl",

        "stopOnEntry": true,

        "reloadModules": true

    }

]

}

Any ideas?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://urlsand.esvalabs.com/?u=https%3A%2F%2Fgithub.com%2Frichterger%2FPerl-LanguageServer%2Fissues%2F13&e=09b421e4&h=12d12973&f=y&p=y , or unsubscribe https://urlsand.esvalabs.com/?u=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAS25Z3F2L25PSJACPTICETRHEW53ANCNFSM4LGTMEVA&e=09b421e4&h=363f88cd&f=y&p=y .

-- This message has been checked by Libraesva ESG and is found to be clean. Mark it as spam http://srvmailgw3.i.ecos.de/cgi-bin/learn-msg.cgi?id=9772A420DB.AF0D8 Blacklist sender http://srvmailgw3.i.ecos.de/cgi-bin/learn-msg.cgi?blacklist=1&id=9772A420DB.AF0D8

slymz commented 4 years ago

I have Perl::LanguageServer installed, and it is in in the path. All of the browsing capability works just fine at the moment. The Output window shows parsing detail etc.

On VSCode terminal, I checked the following:

$ perl -MPerl::LanguageServer -e 'print $Perl::LanguageServer::VERSION ."\n";'
2.0.1
$ perl -MPerl::LanguageServer::DebuggerInterface -e 'print $Perl::LanguageServer::VERSION ."\n";'
Cannot connect to : (Invalid argument) at /home/slymz/perl5/lib/perl5/Perl/LanguageServer/DebuggerInterface.pm line 1596.
Compilation failed in require.
BEGIN failed--compilation aborted.

Are there any other diagnostics output that I can turn on/look at and provide you with for more info?

thanks

richterger commented 4 years ago

To me it looks like the wrong perl interpreter is startet. I guess the one from /usr/bin/perl instead of /nfs/site/disks/psg_ctools_1/perl/5.24.1/linux64/rhel/bin/perl

Setting perl.perlCmd to /nfs/site/disks/psg_ctools_1/perl/5.24.1/linux64/rhel/bin/perl should fix the problem.

The perlInc was only used by the syntax parser and not by the debugger. This is fixed in commit 5331fd36615d1420fb792ad5c3489a5414a11111