python debug(PySnooper)

不同于其他编程语言,python是没有编译器的,debug全靠print。

两种解决方法:

①jupyter分段运行,还可查看每段运行结果的分析。

②专为python debug服务的简约工具:pysnooper

想要检查哪里,加上装饰器@pysnooper.snoop()到函数前即可。

猜你喜欢

转载自blog.csdn.net/qq_36663518/article/details/107537729