Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How to perldebug a Term::ReadLine application (the other way round)

by RonW (Parson)
on Dec 01, 2014 at 18:21 UTC ( #1108864=note: print w/replies, xml ) Need Help??


in reply to Re: How to perldebug a Term::ReadLine application (the other way round)
in thread How to perldebug a Term::ReadLine application

Why not:

DEBUG_TTY=`tty` xterm -e perl -d ./myRLprog.pl

Then in myRLprog.pl, include:

if (defined $ENV{DEBUG_TTY}) { my $tty = $ENV{DEBUG_TTY}; open my $out,'>',$tty; open my $in,'<',$tty; my $term = Term::ReadLine->new('Simple Perl calc',$in,$out); } else { ...; }

Would that work?

Replies are listed 'Best First'.
Re^3: How to perldebug a Term::ReadLine application (the other way round)
by LanX (Archbishop) on Dec 01, 2014 at 18:45 UTC
    well this works

    PERLDB_OPTS="ReadLine=0" MASTER_TTY=`tty` xterm -e perl -d calc_TRL.pl

    with

    otherwise the debugger starts spontaneously to write to the master terminal, IMHO a bug somewhere between debugger and TRL.

    My former approach to redirect the app's tty to a slave terminal has the advantage to run without lost of features in IDEs like emacs.

    The slave terminal can also be an extra sub-window within the IDE running a terminal emulation.

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1108864]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2020-04-07 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (43 votes). Check out past polls.

    Notices?