Can PyCharm set breakpoints on ipython notebook?

随声附和 提交于 2020-01-05 03:09:13

问题


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

If it's possible, please let me know.


回答1:


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).



来源:https://stackoverflow.com/questions/31365093/can-pycharm-set-breakpoints-on-ipython-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!