python pdb调试模块使用
2014-01-09 12:58
411 查看
一般在需要调试的文件加入下面代码即可
################
_DEBUG = True
...
if _DEBUG == True
import pdb
pdb.set_trace()
################
之后执行文件,就会进入调试状态,常用调试命令和gdb下基本一样,相当好用
如 c (continue) ,n(next),p(print),s(step into) ,bt(打印堆栈)
################
_DEBUG = True
...
if _DEBUG == True
import pdb
pdb.set_trace()
################
之后执行文件,就会进入调试状态,常用调试命令和gdb下基本一样,相当好用
如 c (continue) ,n(next),p(print),s(step into) ,bt(打印堆栈)
相关文章推荐
- 使用pdb模块调试Python脚本
- 使用pdb模块调试Python程序实例
- 使用Python中PDB模块中的命令来调试Python代码的教程
- 使用pdb模块调试Python程序实例
- 使用pdb调试python程序
- 使用PDB调试Python程序
- python中pdb调试使用
- 使用PDB进行Python调试
- 如何使用pdb调试python程序
- 使用PDB调试Python程序
- 使用PDB调试Python程序
- 使用scite和pdb来调试python程序
- 使用PDB简单调试Python程序简明指南
- 使用pdb (ipdb) 调试 python 程序
- 使用PDB调试Python程序
- python的调试工具pdb使用问题解决
- 使用PDB(The Python Debugger)命令行调试Python代码
- 使用pdb调试Python程序
- 使用Pdb调试Python
- 使用PDB调试Python程序