Call the pdb debugger. Keywords: - force(False): by default, this routine checks the instance call_pdb flag and does not actually invoke the debugger if the flag is false. The 'force' option forces the debugger to activate even if the flag is f
(self,force=False)
| 1217 | 'Control auto-activation of pdb at exceptions') |
| 1218 | |
| 1219 | def debugger(self,force=False): |
| 1220 | """Call the pdb debugger. |
| 1221 | |
| 1222 | Keywords: |
| 1223 | |
| 1224 | - force(False): by default, this routine checks the instance call_pdb |
| 1225 | flag and does not actually invoke the debugger if the flag is false. |
| 1226 | The 'force' option forces the debugger to activate even if the flag |
| 1227 | is false. |
| 1228 | """ |
| 1229 | |
| 1230 | if not (force or self.call_pdb): |
| 1231 | return |
| 1232 | |
| 1233 | if not hasattr(sys,'last_traceback'): |
| 1234 | error('No traceback has been produced, nothing to debug.') |
| 1235 | return |
| 1236 | |
| 1237 | self.InteractiveTB.debugger(force=True) |
| 1238 | |
| 1239 | #------------------------------------------------------------------------- |
| 1240 | # Things related to IPython's various namespaces |