Getting "open stdin at /usr/local/share/perl/5.34.0/Perl/LanguageServer/DebuggerInterface.pm" - how to resolve?
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?
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?
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?
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.
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: @.***>
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?
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: @.***>
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.