Can PyCharm set breakpoints on ipython notebook?

2019-07-08 09:35发布

I'd like to know how to set breakpoints in IPython notebook on PyCharm.

If it's possible, please let me know.

1条回答
▲ chillily
2楼-- · 2019-07-08 10:18

You must start IPython Notebook from Pycharm's run

  1. Find the IPython path (ex which ipython on linux). Copy the resulting path, we will need it!
  2. On PyCharm go to Run > Edit Configuration > + button on top left most corner (add configuration) > Choose Python. Give your configuration a name.
  3. On the configuration tab, in the Script textbox, paste the path from step 1. On the script, parameters write notebook.
  4. Apply then Ok.

This is essentially like calling ipython notebook from the terminal

Now place your brakepoints and run the notebook from PyCarm (Shift+F10 or click the playbutton).

查看更多
登录 后发表回答