Python 调试

import pdb

s = '0'    
n = int(s)
pdb.set_trace()  # stop here
print(10 / n)

运行之后输入 p n 表示查看n此时的值
在命令行输入c继续运行
输入q结束调试

posted @ 2019-06-03 09:49  开心大人  阅读(128)  评论(0编辑  收藏  举报