Unable to attach debugger after ipykernel/debugger.py gets imported

オープン
#975 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
devtools

調査の方向性

InProcessKernelManager() から ipykernel/debugger.py への import path から始め、ipykernel 6.3.0-or-newer の新しい環境で失敗を再現します。PyCharm または VS Code のデバッガーの attach 動作を確認します。完了の条件は、ipykernel.debugger を fake module に置き換えずにデバッガーを attach できることです。

索引モデルが 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:

image
image
image

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時間
マージ済み PR(30日)
9

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ipython/ipykernel のほかの issue

ipython/ipykernel の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。