Perl-LanguageServer icon indicating copy to clipboard operation
Perl-LanguageServer copied to clipboard

Getting "open stdin at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm" - how to resolve?

Open wdennis opened this issue 1 year ago • 7 comments

Hi all,

I had a debugging session running with a Perl script that uses var=<STDIN> - unfortunately, I did not have that handled in my launch.json file and it hung there - I stopped the debug run and fixed my launch.json, but now on subsequent runs, I get the error as follows:

open stdin at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm line 62.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm line 67.
Compilation failed in require.
BEGIN failed--compilation aborted.

I'm guessing it's file-related, becasue even a reboot of the remote server running the Perl program was rebooted, and I still get this error... How may I clean this up and get the debugger working again?

wdennis avatar Dec 06 '24 03:12 wdennis

Aha - I find that if I remove this line from my "Perl-Debug remote" config, it goes back to working: "args": ["<", "${workspaceRoot}/input"], I did put an input file with the input data at the root folder of my project - is it not able to see that somehow?

wdennis avatar Dec 06 '24 04:12 wdennis

did you try to change to an absolute path like this: "args": ["<", "/home/user/src/project/input"],

did you double check that this file exists?

Does the user running the debugger have read access?

wielandp avatar Dec 06 '24 11:12 wielandp

Changing to an absolute path did work, like as so: "args": ["<", "/tmp/trap-input"],

The file did exist where I had spec'd it previously, and the debugger user did have access. I tested it with a full absolute path before I moved it to /tmp, and it did work. It seems like I cannot use the VS Code launch.json vars like ${workspaceRoot} or ${workspaceFolder} which I had also tried.

wdennis avatar Dec 06 '24 20:12 wdennis

Vars do not work in lauch.json, that's a limitation of VSCode

Von: Will Dennis @.> Gesendet: Freitag, 6. Dezember 2024 21:49 An: richterger/Perl-LanguageServer @.> Cc: Subscribed @.***> Betreff: Re: [richterger/Perl-LanguageServer] Getting "open stdin at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm" - how to resolve? (Issue #214)

Changing to an absolute path did work, like as so: "args": ["<", "/tmp/trap-input"],

The file did exist where I had spec'd it previously, and the debugger user did have access. I tested it with a full absolute path before I moved it to /tmp, and it did work. It seems like I cannot use the VS Code launch.json vars like ${workspaceRoot} or ${workspaceFolder} which I had also tried.

Reply to this email directly, view it on GitHubhttps://github.com/richterger/Perl-LanguageServer/issues/214#issuecomment-2524150198, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAS25ZYWHPU2EKG2ZFEO5VL2EIETTAVCNFSM6AAAAABTD2DDAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRUGE2TAMJZHA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

richterger avatar Dec 07 '24 11:12 richterger

Maybe changing the error message from: open stdin at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm to open stdin from "${workspaceRoot}/input" at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm would make this clearer?

wielandp avatar Dec 08 '24 10:12 wielandp

I do not believe that is quite correct - there are other vars in use in my launch.json, and they all work…

And the ones I have in there were written by the plugins template - I did not put them there, except for the Perl plugin.

On Sat, Dec 7, 2024 at 6:42 AM Gerald Richter @.***> wrote:

Vars do not work in lauch.json, that's a limitation of VSCode

Von: Will Dennis @.> Gesendet: Freitag, 6. Dezember 2024 21:49 An: richterger/Perl-LanguageServer @.> Cc: Subscribed @.***> Betreff: Re: [richterger/Perl-LanguageServer] Getting "open stdin at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm" - how to resolve? (Issue #214)

Changing to an absolute path did work, like as so: "args": ["<", "/tmp/trap-input"],

The file did exist where I had spec'd it previously, and the debugger user did have access. I tested it with a full absolute path before I moved it to /tmp, and it did work. It seems like I cannot use the VS Code launch.json vars like ${workspaceRoot} or ${workspaceFolder} which I had also tried.

Reply to this email directly, view it on GitHub< https://github.com/richterger/Perl-LanguageServer/issues/214#issuecomment-2524150198>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AAS25ZYWHPU2EKG2ZFEO5VL2EIETTAVCNFSM6AAAAABTD2DDAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRUGE2TAMJZHA

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/richterger/Perl-LanguageServer/issues/214#issuecomment-2525081994, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNDWNOV7JN3WANR6XXUDS32ELNJZAVCNFSM6AAAAABTD2DDAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRVGA4DCOJZGQ . You are receiving this because you authored the thread.Message ID: @.***>

wdennis avatar Dec 09 '24 10:12 wdennis

I did test and it worked for me. But I created a pull request https://github.com/richterger/Perl-LanguageServer/pull/215 to have a nicer error message. If ${workspaceRoot} is not what you think it is, the error message is a big help.

wielandp avatar Dec 11 '24 10:12 wielandp