remote pdb can not attach when breakpoint() and exit
未关闭
还没有人认领这个 Issue。
stdlib
type-bug
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
reproduce
on terminal
./python.exe
breakpoint()
# ctrl + D
another terminal
sudo ./python.exe -m pdb -p $(pid)
more can check png below
debug:
Pdb._last_pdb_instance still when do_quit in repl so remote pdb can not exec in it
fix:
diff --git a/Lib/pdb.py b/Lib/pdb.py
index f695a39332..3e32c50f96 100644
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -2008,6 +2008,7 @@ def do_quit(self, arg):
return
self._user_requested_quit = True
+ Pdb._last_pdb_instance = None
self.set_quit()
return 1
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
- gh-139690
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Lib/pdb.py 中的 Pdb.do_quit 开始,在检查提议的更改之前,先复现 issue 中的 breakpoint() 和 exit 序列。验证退出本地调试器后是否允许稍后进行 remote pdb attach,并检查链接的 PR gh-139690,了解已经在进行的工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 30/100