问题描述
此问题之前已经,但我找不到一个好的答案。所以,我想再问一次。
This question has been asked before, but I couldn't find a good answer. So, I am trying to ask again.
我希望我的ipdb能够记住跨会话的命令。现在,它可以提取在Ipython会话中执行的命令,但不能从旧的ipdb会话中提取。如果我可以拥有此功能,那将节省大量时间。
I would like my ipdb to remember commands across sessions. Right now, it can pull up commands executed in Ipython sessions but not from old ipdb sessions. It would be a huge time saver, if I could have this feature.
有没有人能解决这个问题?
Does anyone have a solution to this problem?
推荐答案
我有同样的问题,所以我项目并添加一个持久历史补丁。您可以使用pip安装分叉版本的ipdb:
I had your same problem, so I forked the project and add a patch for persistent history. You can install the forked version of ipdb with pip:
pip install git+https://github.com/michelesr/ipdb.git
请确保您的IPython版本为5.0或更高版本。可在此中找到实施信息。
Just make sure that your IPython version is 5.0 or higher. Implementation info can be found in this article.
这篇关于跨ipdb会话的历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!