使用 ipdb
通过安装
pip install ipdb
用法:
In[1]: def fun1(a): def fun2(a): import ipdb; ipdb.set_trace() # debugging starts here return do_some_thing_about(b) return fun2(a)In[2]: fun1(1)
用于逐行执行
n和进入函数使用,
s并退出调试提示使用
c。
有关可用命令的完整列表:https
:
//appletree.or.kr/quick_reference_cards/Python/Python%20Debugger%20Cheatsheet.pdf
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)