Unable to attach debugger after ipykernel/debugger.py gets imported
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the import path from InProcessKernelManager() into ipykernel/debugger.py and reproduce the failure using a fresh ipykernel 6.3.0-or-newer environment. Check the PyCharm or VS Code debugger attach behavior; done means the debugger can attach without replacing ipykernel.debugger with a fake module.
Written by the indexing model from the issue text.
Description
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()
- Dominant language
- Python
- Stars
- 734
- Forks
- 411
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ipython/ipykernel
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
ipython/ipykernel#1550 · 1 comment · 1 reaction · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
All issues in ipython/ipykernel
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·