IPython逐步调试导入的模块 [英] IPython Step by step debugging of the imported module
本文介绍了IPython逐步调试导入的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在导入的模块中设置断点,然后从ipython逐步调试。
I would like to set breakpoint in the imported module and debug step by step from ipython.
我从ipython调用了单独的函数,而不是整个模块,所以%
I call separate function from ipython, not the whole module, so %run is not an option.
推荐答案
请参阅我的博客条目以获得完整说明。
See my blog entry for a full description.
摘要:
from IPython.core.debugger import Pdb
ipdb = Pdb()
ipdb.runcall(my_imported_function, args...)
这篇关于IPython逐步调试导入的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文