[sf-perl] Debugger goodies rendered worthless

Joe Brenner doom at kzsu.stanford.edu
Wed Jun 20 10:25:40 PDT 2007

David Alban <extasia at extasia.org> wrote:

> As you may know, the ability to start a perl debugger command with a
> pipe symbol, so that it pages the output, can be a very handy thing.
> Both to actually page the output, and, in the case of using less(1) as
> your pager, to be able easily to save the output to a file while
> debugging.
> I'm debugging on a machine in which many things that have worked for
> me on other machines don't seem to work.  Prepending the pipe symbol
> to debugger commands doesn't page the output.  The terminal settings
> are messed up.  For instance, the stty settings for erase, kill,
> werase, lnext aren't set.  (I tried setting them in the target user's
> .bash_profile, to no avail.)  In fact, in the debugger, this works:
>   !! ls
> But I get:
>   DB<10> !!stty
> stty: standard input: Invalid argument
> (Command exited 1)
> wtf?
> Because the stty erase, werase, and kill characters aren't set (or, at
> least, because I can't shell out to execute stty, I can't determine
> what they are), I have to type each debugger command perfectly, or I'm
> wasting a lot of time.
> Any suggestions?

Probably not from me, I tend to run the debugger inside of emacs, 
and if I want to save some output, I can cut-and-paste using emacs 

> Since I wrote the above text, I figured, maybe it's because what I'm
> doing is running a perl program on host A which is ssh'ing to host B,
> sudo'ing another perl program as root.  I think that somehow, going
> over the network and/or going through ssh is rendering the helpful
> features inoperative.
> Have others run into this?  Is it a solvable problem?

Are you doing a plain "ssh" or "ssh -X"?  I've seen a simple "-X" 
fix what I thought were baffling tty issues in the past (it let's 
you start up X applications over ssh).

Running as root can give you X app problems as well, of course... 
but I'm not sure that's your difficulty.

More information about the SanFrancisco-pm mailing list