一、使用pdb

 

二、使用gdb

需首先配置gdb pythin支持,步骤如下:

1、修改Python-2.6/Misc/gdbinit,将

while $_i < f->f_nlocals

修改为

while $_i < f->f_code->co_nlocals

2、在文件:~/.gdbinit中,加入如下内容

source Python-2.6/Misc/gdbinit

 

调试方法

gdb python  
run true_false.py

1

 

三、使用ipdb

安装方法:

ipdb (easy_install ipdb) - 像 ipython (自动补齐, 颜色等) 

 

四、使用pudb

安装方法:

pudb (easy_install pudb) - 基于curses (类gui), 浏览源码有很好的表现

教程

posted on 2015-12-05 23:48  红孩儿你好  阅读(231)  评论(0编辑  收藏  举报