当前位置:Gxlcms >
数据库问题 >
[python] 像gdb一样用pdb debug python程序
[python] 像gdb一样用pdb debug python程序
时间:2021-07-01 10:21:17
帮助过:22人阅读
]─[
11:
37:
33 AM]
╰─>$ python -
m pdb longest_substring.py a1234 c23d
> /home/tong/Src/copyleft/algorithm/
string/longest_substring.py(
3)<module>
()
->
import sys
(Pdb) b lss
Breakpoint 1 at /home/tong/Src/copyleft/algorithm/
string/longest_substring.py:
10
(Pdb) r
a1234
c23d
> /home/tong/Src/copyleft/algorithm/
string/longest_substring.py(
11)lss()
-> la =
len(a)
(Pdb)
[classic_tong @ https://www.cnblogs.com/hugetong/]
像gdb的用法一样,命令b设置断点,命令r运行程序,命令n单步执行。
[python] 像gdb一样用pdb debug python程序
标签:ges pre org code master bst blank 断点 程序