History across ipdb sessions

落爺英雄遲暮 提交于 2019-12-06 00:38:57

问题


This question has been asked before, but I couldn't find a good answer. So, I am trying to ask again.

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?


回答1:


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

Just make sure that your IPython version is 5.0 or higher. Implementation info can be found in this article.




回答2:


If you are wiling to use another debugger, trepan has does save history across sessions.



来源:https://stackoverflow.com/questions/26810905/history-across-ipdb-sessions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!