274914765qq

一、使用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), 浏览源码有很好的表现

教程

分类:

技术点:

相关文章:

  • 2021-12-15
  • 2021-12-15
  • 2021-10-28
  • 2021-08-16
  • 2022-01-22
  • 2021-07-07
猜你喜欢
  • 2021-12-05
  • 2021-12-05
  • 2021-12-05
  • 2021-10-06
  • 2021-06-10
相关资源
相似解决方案