From e385644f5f32eee1d5007119de3c47c589545176 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Mon, 29 Dec 2014 13:59:23 +0100 Subject: python: pdb instructions --- software/python.page | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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. + + -- cgit v1.2.3