python调试工具
2021-04-07 22:26
标签:调试 style port imp for trace import shu 项目 import pdb;pdb_set_trace() #适合在项目中打断点调试 # https://www.jianshu.com/p/d3c5f79625f4 pysnooper #https://www.jianshu.com/p/57d51311aa63 python调试工具 标签:调试 style port imp for trace import shu 项目 原文地址:https://www.cnblogs.com/wzy23/p/13381847.htmlimport pdb
import pysnooper
@pysnooper.snoop()
def add(x, y):
k = 10
z = x + y
for i in range(k):
#pdb.set_trace()
z += i
return z
def main():
x, y = 1, 2
# pdb.set_trace()
z = add(x, y)
print(z)