Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programing Python Tools pdb #303

Open
junxnone opened this issue Apr 23, 2024 · 0 comments
Open

Programing Python Tools pdb #303

junxnone opened this issue Apr 23, 2024 · 0 comments

Comments

@junxnone
Copy link
Owner

junxnone commented Apr 23, 2024

pdb

  • 插入断点以便逐步调试
import pdb; 

your_code
...
pdb.set_trace()
....


调试方法

h (help) : 帮助
n(next):执行下一行代码。
c(continue):继续执行直到下一个断点。
s(step):逐行执行代码,如果遇到函数则进入函数内部。
q(quit):退出调试模式。
w (where) : 打印 stack trace
r (return) : 继续执行到当前函数的返回处
l (list): 列出当前执行的行附近的行(默认 11行,可以加参数)
ll (longlist): 列出整个function 或 frame

Reference

@junxnone junxnone changed the title Programing Python Tools Debug Programing Python Tools pdb Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant