JupyterLabでデバッグ

Jupyterlab v3がリリースされました。 JupyterLab 3.0 is released!. The 3.0 release of JupyterLab brings… | by Jeremy Tuloup | Jan, 2021 | Jupyter Blog

デバッガ(xeus-python)が含まれています。 print文を使ったデバッグから脱却できます。

お約束のvenv

$ python -m venv venv
$ source venv/bin/activate

jupyterlabをインストールします。 JupyterLab 3.0 is released!. The 3.0 release of JupyterLab brings… | by Jeremy Tuloup | Jan, 2021 | Jupyter Blog

$ pip install jupyterlab==3

カーネル(xeus-python)をインストールし、登録します。

$ pip install xeus-python
$ venv/bin/ipython kernel install --user --name=xeus-python --display-name=xeus-py

jupyterlabを起動します。

venv/bin/jupyter-lab
  • venvのpythonカーネルを選択してデバッグをonにします。
  • ブレイクポイントを設定し実行します。
    f:id:unokun3:20210111082214p:plain
    debugging on jupyterlab