-->

我可以跟踪所有在Python脚本执行函数/方法?(Can I trace all the funct

2019-06-23 11:12发布

有没有一种方法以编程方式跟踪的所有Python函数/方法的执行? 我希望看到什么样的参数每个人的情况下调用。 我真正的意思是,我没兴趣一丝装饰。

在Ruby中,我可以别名我想的方法和添加额外的行为存在。

Answer 1:

看一看在跟踪模块。

您也可以通过命令行来使用它:

python -m trace --help


文章来源: Can I trace all the functions/methods executing in a python script?