lguohan
Saturday, October 14, 2006
使用pdb调试python
前些日子在blogden的帖子介绍了一种调试方法,在程序中产生异常,这相当于c语言中加入assert()语句。"
Automatic invocation of pdb on exceptions
"
另一种方法则是在程序中插入断点,在你需要插入断点地方插入语句:
import pdb; pdb.set_trace()
参考http://plone.org/documentation/how-to/using-pdb
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment