Perl-LanguageServer
Perl-LanguageServer copied to clipboard
Debugging when script reads from <stdin>
Hi,
I am not able to debug a script that reads from <stdin>
. For example, when debugging below script by stepping over the line "$x = <stdin>"
, the debugger does not accept input from the "debug console" pane. It prints stdout to this pane but doesn't seem to accept <stdin>
input. Want to know where to enter this input.
#!/usr/bin/perl
$x = <stdin>;
$y = <stdin>;
$z = $x + $y;
print "the sum of $x and $y is $z\n";
Reading from stdin are not yet implemented. Any contributions are welcome.
You can just pass in the stdin value as a file name under arguments in the launch file.
https://github.com/richterger/Perl-LanguageServer/pull/166 should fix this
stdin redirect is implemented in 2.6.0+