Python 调试实用程序

这是一个实用程序模块,可帮助使用以下功能调试 python 源代码
此模块在几个关键方面为开发人员提供帮助,特别是在调试和维护代码方面。以下是主要好处:
通过利用 whoami、whereami、whocalledme、calledtree 和 whosdaddy,开发人员可以创建更健壮、可维护且更易于调试的代码。
from pdbwhereami import whoami, whereami, whocalledme, calledtree, whosdaddy
def debug_utility():
whoami()
whoami("i am in test_whoami function")
print()
whereami()
whereami("i am in test_whereami")
whereami(obsolete_path = true)
whereami(path_depth=6)
print()
whocalledme()
whocalledme(obsolete_path = true)
whocalledme(path_depth=6)
print()
calledtree()
tstr = calledtree(verbose=false)
print(tstr)
calledtree(tree_depth=1)
calledtree(tree_depth=2)
print()
whosdaddy()
debug_utility()
[debug_utility] -> [debug_utility] -> i am in test_whoami function [whereami/main.py:71]:debug_utility -> [whereami/main.py:72]:debug_utility -> i am in test_whereami [/home/bhagavan/whereami/main.py:73]:debug_utility -> [/home/bhagavan/whereami/main.py:74]:debug_utility -> [whereami/main.py:93]:<module> -> [/home/bhagavan/whereami/main.py:93]:<module> -> [/home/bhagavan/whereami/main.py:93]:<module> -> #1[/home/bhagavan/whereami/main.py:84]:debug_utility ] -> </module></module></module>
pip install pdbwhereami
git clone https://github.com/bhagavansprasad/pdbwhereami.git cd pdbwhereami pip insall ./
以上就是Python 调试实用程序的详细内容,更多请关注php中文网其它相关文章!
《无所畏惧》温莉的结局是什么
时间:2023-11-25
《无所畏惧》刘铭的结局是什么
时间:2023-11-25
《无所畏惧》罗英子和陈硕最后在一起了吗
时间:2023-11-25
《宁安如梦》 姜雪宁是如何设计让薛姝去和亲
时间:2023-11-25
《宁安如梦》薛姝为了不和亲做了什么
时间:2023-11-25
《宁安如梦》为什么姜雪蕙只能当侧妃
时间:2023-11-25