IPython Step by step debugging of the imported module

ぃ、小莉子 提交于 2019-12-10 14:35:29

问题


I would like to set breakpoint in the imported module and debug step by step from ipython.

I call separate function from ipython, not the whole module, so %run is not an option.


回答1:


See my blog entry for a full description.

In summary:

from IPython.core.debugger import Pdb
ipdb = Pdb()
ipdb.runcall(my_imported_function, args...)


来源:https://stackoverflow.com/questions/21824276/ipython-step-by-step-debugging-of-the-imported-module

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