summaryrefslogtreecommitdiffstats
path: root/software
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2014-12-29 13:59:23 +0100
committerbnewbold <bnewbold@robocracy.org>2014-12-29 14:02:44 +0100
commite385644f5f32eee1d5007119de3c47c589545176 (patch)
treeb25762ac63865a92f3f5ab985f0485b7f7b3e3d6 /software
parenta9b0d9fb01138da2a5c7b10e8fa32d86c13cf241 (diff)
downloadknowledge-e385644f5f32eee1d5007119de3c47c589545176.tar.gz
knowledge-e385644f5f32eee1d5007119de3c47c589545176.zip
python: pdb instructions
Diffstat (limited to 'software')
-rw-r--r--software/python.page13
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.
+
+