Perl调试器可以将ReadLine历史记录保存到文件吗? [英] Can the Perl debugger save the ReadLine history to a file?

查看:147
本文介绍了Perl调试器可以将ReadLine历史记录保存到文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



但是,Perl调试器拒绝保存会话命令行历史记录。



因此,每次调用调试器时,都会丢失以前的所有历史记录。



有谁知道如何使用Perl调试器保存,希望将会话历史记录类似于bash HISTORYFILE

解决方案

我的方式是在我的〜/ .perldb 文件中加入以下行:



& parse_options(HistFile = $ ENV {HOME} /。perldb.hist);



调试器命令然后存储在〜/ .perldb.hist 中,并可跨会话访问。


I work quit a bit with lib ReadLine and the lib Perl Readline.

Yet, the Perl debugger refuses to save the session command line history.

Thus, each time I invoke the debugger I lose all of my previous history.

Does anyone know how to have the Perl debugger save, and hopefully, append session history similar to the bash HISTORYFILE ?

解决方案

The way I do this is by having the following line in my ~/.perldb file:

&parse_options("HistFile=$ENV{HOME}/.perldb.hist");

Debugger commands are then stored in ~/.perldb.hist and accessible across sessions.

这篇关于Perl调试器可以将ReadLine历史记录保存到文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆