简体   繁体   中英

Debuging .py code called from jupyter notebook

I'm really new to python and used to work with matlab and I'm getting really frustrated about the debugging capabilities with python.

I'm currently trying to do a homework task given in CS231 course ( http://cs231n.github.io/ ), and I'm working with pyCharm (and anaconda). In the homework I have a .ipynb (jupyter notebook file) that guides me through the assignment and in that file I have calls to .py files where I write my own code. I'm trying to figure out a way to debug the code I write. In matlab I could easily set a break point inside the code I wrote and debug it when an external function calls it, while in python, I can't set a breakpoint and debug a code that is called from a jupyter notebook (it just ignores the breakpoint).

Is there a way of doing so? And if not what is the best way to debug those kind of stuff? And less importantly but why is it so difficult to easily debug code in python as opposed to matlab?

Thank you very much!

PyCharm Professional 2019允许您运行和调试 Jupyter Notebook单元。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM