dominix has asked for the wisdom of the Perl Monks concerning the following question:


someone has asked on [news://fr.comp.lang.perl|fr.comp.lang.perl] how to use a feature of the perl debuger which consist to send debug information on another TTY using TTY/noTTY option of $ENV{PERLDB_OPTS}

Willing to help, I've searched perldoc for perldebug perldebtut perldebguts. Maybe I misunderstood the doc but I was unable to find Term::Rendezvous (??) and I'm still stuck on the way to use Term redirection with the debugger. does someone ever successfully used this feature and can explain it ?

  • Comment on PerlDebug and mysterious Term::Rendezvous

Replies are listed 'Best First'.
Re: PerlDebug and mysterious Term::Rendezvous
by neuroball (Pilgrim) on Jan 30, 2004 at 06:53 UTC

    Maybe this is a misunderstanding... but there is a way to redirect the output of a perl debug session to another terminal.

    Using perl -d > /dev/tty1 all output from the debugged script will be send to tty1 and leaves the debug session clutter free.


      Thanks, but I already tried that, and that not what I want.
      I was expecting for a control of the debugger from another tty while normal program display append on the original tty. is THAT possible ?

        Hm... I think so. I just had to do some research to find out how to overcome the terminal from taking over the input/output of the debugger.

        You have to do the following:

        • Figure out what your debug options will be and either write the options to the .perldb file or add it to the PERLDB_OPTS environment variable like so:
          • .perldb
            parse_options("TTY=/dev/ttyp3 LineInfo=/dev/ttyp4 ReadLine=1");
          • terminal
            PERLDB_OPTS="TTY=/dev/ttyp3 LineInfo=/dev/ttyp4 ReadLine=1" perl -d
        • TTY is the terminal you want to debug in.
        • LineInfo is the terminal you want to see the output of your script in
        • ReadLine signals that you want to step through your script
        • Though for the whole thing to work you have to send the terminal you want to debug in to sleep before you start to debug. I.e. Go to ttyp3 and give it a command of sleep 1000000.