|
|
|
|
|
by wodow
4586 days ago
|
|
This is only convenient in cases where (a) the breakpoint line doesn't move around a lot between different executions, as you edit the code; (b) you don't want to programatically invoke the debugger (i.e. if f(x): pdb.set_trace() ) |
|
(b) Pdb supports conditions with `filename:lineno, statement`. Statement will have access to local scope. E.g.:
Really, it does a bunch of things. I wonder why developers are unaware of it.http://docs.python.org/2/library/pdb.html