在linux中,可以在交互界面和命令行使用调试,这里,记录下命令行的调试

  1. 在命令行使用

    python27 -m pdb use_infix2postfix.py 就可以进入调试模式

  2. > /root/py/algor/use_infix2postfix.py(7)<module>()

    -> import types  这是脚本的第一条语句

  3. h(elp)

    

(Pdb) h


Documented commands (type help <topic>):

========================================

EOF    bt         cont      enable  jump  pp       run      unt   

a      c          continue  exit    l     q        s        until 

alias  cl         d         h       list  quit     step     up    

args   clear      debug     help    n     r        tbreak   w     

b      commands   disable   ignore  next  restart  u        whatis

break  condition  down      j       p     return   unalias  where 


可以显示可用的参数


4.

(Pdb) h n

n(ext)

Continue execution until the next line in the current function

is reached or it returns.


5.

(Pdb) h n

n(ext)

Continue execution until the next line in the current function

is reached or it returns.

这样,就可以自己查找不同的使用参数和详细信息了