debug notebook from PyCharm
tested on Ubuntu 16.04 LTS, PyCharm 2018.3 Pro(me) PyCharm Community(@Pomo). Python 3.6.x. fast-ai 1.0.28.dev0(me). My opinion about other Python/OS usage here
PyCharm and Jupyter must use the same python environment (not sure about it, but I use this setup)
- move code which you want to debug to separate
module
- start Jupyter server in terminal window:
cd <project dir>
source activate <env>
jupyter notebook
- in PyCharm
- set breakpoint in code
- C+A+5 Attach to process…
- if you got connection error - read this
- in Jupyter:
- create notebook
- import
module
- run code
- profit