Save `pdb` Line History Between Runs
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Feature or enhancement
Proposal:
When using pdb, it is possible to use the arrow keys (up/down) to navigate through previous commands. However, commands between runs are not preserved (unlike in the REPL).
I would like commands to be preserved between runs. For me, the most common use case for this is setting a breakpoint in the same place. Currently, I do this with python -m pdb -c "break file.py:line" ....
I am not familiar with how the pdb is implemented, but I have used bdb in depth in the past. I assume that it is possible to do this in a similar way to the REPL history. There is a workaround available here: https://stackoverflow.com/a/35390866/.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪 pdb 如何处理命令历史,并将其与 REPL 历史的行为进行比较;该 issue 指向 bdb 和入口点 python -m pdb -c。确认预期的持久化范围,然后验证在一次调试运行中输入的命令可在之后的运行中使用,同时不会破坏方向键导航或现有的 -c 命令。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli, devtools
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100