diff options
author | bnewbold <bnewbold@robocracy.org> | 2014-12-29 13:59:23 +0100 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2014-12-29 14:02:44 +0100 |
commit | e385644f5f32eee1d5007119de3c47c589545176 (patch) | |
tree | b25762ac63865a92f3f5ab985f0485b7f7b3e3d6 /software | |
parent | a9b0d9fb01138da2a5c7b10e8fa32d86c13cf241 (diff) | |
download | knowledge-e385644f5f32eee1d5007119de3c47c589545176.tar.gz knowledge-e385644f5f32eee1d5007119de3c47c589545176.zip |
python: pdb instructions
Diffstat (limited to 'software')
-rw-r--r-- | software/python.page | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/software/python.page b/software/python.page index cd1fb0b..b0a01e0 100644 --- a/software/python.page +++ b/software/python.page @@ -114,3 +114,16 @@ To do interactive pdb debugging, simply: $ nosetests --pdb-failures +pdb +------- +To debug a script (interactive prompt on exception): + + python -m pdb myscript.py + +or in-line, always at a particular point: + + import pdb; pdb.set_trace() + +Use ipdb (debian: python-ipdb) instead of pdb to get a nicer IPython prompt. + + |