Wednesday, April 28, 2010

python debug

利用pdb调试程序,在指定的位置调用起来pdb。
# epdb1.py -- experiment with the Python debugger, pdb  import pdb  a = "aaa"  pdb.set_trace()  b = "bbb"  c = "ccc"  final = a + b + c  print final

4. Now run your program from the command line as you usually do, which will probably look something like this:

PROMPT> python epdb1.py

No comments: