Unable to attach debugger after ipykernel/debugger.py gets imported
还没有人认领这个 Issue。
评估
调研方向
从 InProcessKernelManager() 到 ipykernel/debugger.py 的导入路径开始,并在全新的 ipykernel 6.3.0-or-newer 环境中重现该故障。检查 PyCharm 或 VS Code 调试器的 attach 行为;完成的标准是调试器可以 attach,而无需将 ipykernel.debugger 替换为 fake module。
由索引模型根据 Issue 内容生成。
描述
The problem starts at version ipykernel==6.3.0 and up. I created a fresh venv in PyCharm and this is what I see in the "Python Window" when clicking the "Attach Debugger" button:



When I use the PyCharm "Debug Server" it locks up forever when trying to connect.
Other team members using vscode are having the same problem.
I'm currently working around the problem with this code at launch of product:
class FakeDebuggerModule:
Debugger = None
_is_debugpy_available = False
import sys
sys.modules['ipykernel.debugger'] = FakeDebuggerModule
The code my application is running which causes debugger.py to get imported is:
from ipykernel.inprocess import InProcessKernelManager
InProcessKernelManager()
- 主要语言
- Python
- 星标
- 734
- 派生
- 411
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ipython/ipykernel 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 68/100
查看 ipython/ipykernel 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
learningequality/ricecooker#747 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 76/100
run-llama/llama_index#23199 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
KhronosGroup/glTF-Blender-IO#2769 ·