Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Persistent readline history with perldb

by LanX (Saint)
on Apr 12, 2011 at 17:52 UTC ( [id://899013]=CUFP: print w/replies, xml ) Need Help??

For the afterworld:

In a CB-discussion we figured out a way to have a persistent input history for the perl-debugger,

alias pdb="rlwrap -H .perl_history perl -de0"

CAUTION: This alias will overwrite the python debugger "pdb", a price addicts like PythonFan would never pay!

you might need to disable readline-support in the .perldb file

parse_options("TTY=/dev/stdin ReadLine=0");

(should be possible to supply this last option on the CLI within the alias, but I couldn't figure it out within a posts timespan.)

Tested on Ubuntu Linux. Please post if and how it works for you!

Cheers Rolf

PS: CB-Log for the fame

Replies are listed 'Best First'.
Re: Persistent readline history with perldb
by mirod (Canon) on Apr 13, 2011 at 06:07 UTC

    How about using the available option for a history file:

    echo "&parse_options('HistFile=$HOME/.perldb.hist');" > $HOME/.perldb
      >How about using the available option for a history file:

      Thanks, seems to work even better! :) ¹

      Pitty that it's not mentioned in perldebug

      At least rlwrap had the benefit to have the same interface like bash has...

      Cheers Rolf

      1) First impressions: well C-d doesn't work anymore for exiting and the line numbering now starts where I left last time.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://899013]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-16 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found