Apologies if this is a stupid question - I'm fairly new to the whole PERL/Eclipse thing - but I'm trying to get debug working on a Perl script that reads in from a text file via STDIN.
For example - if I run from the shell - './MyScript.pl -t 10 < ./Input.txt' - (the script currently has a single argument) then the script works.
However I don't appear to be able to find a way of doing this in debug from within Eclipse. In debug configuration I can set a program arguments up to read '-t 10 < ,/Input.txt' - but whilst the script goes into debug and correctly picks up the argument it doesn't appear to take in the text file (no STDIN is seen).
I have tried an alternate approach of using the 'Run as External Tools' to call a shell script - which runs the script correctly but doesn't allow me to debug the script (i.e. none of my breakpoints are hit).
I'm sure I'm missing something obvious - but any help would be much appreciated.
There is currently no way to set STDIN for a script from EPIC, but you can do it in a wrapper Perl script:
(or reopen STDIN directly in the target script if you can modify it)
Thanks for the help. Will try that. In the interim I decided to use a program argument to tell the script to either use STDIN or read in from a file - and then just tell the script to read in from the file via the arguments in Eclipse.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.