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)
| 1171 | 'Control auto-activation of pdb at exceptions') |
| 1172 | |
| 1173 | def debugger(self,force=False): |
| 1174 | """Call the pdb debugger. |
| 1175 | |
| 1176 | Keywords: |
| 1177 | |
| 1178 | - force(False): by default, this routine checks the instance call_pdb |
| 1179 | flag and does not actually invoke the debugger if the flag is false. |
| 1180 | The 'force' option forces the debugger to activate even if the flag |
| 1181 | is false. |
| 1182 | """ |
| 1183 | |
| 1184 | if not (force or self.call_pdb): |
| 1185 | return |
| 1186 | |
| 1187 | if not hasattr(sys,'last_traceback'): |
| 1188 | error('No traceback has been produced, nothing to debug.') |
| 1189 | return |
| 1190 | |
| 1191 | self.InteractiveTB.debugger(force=True) |
| 1192 | |
| 1193 | #------------------------------------------------------------------------- |
| 1194 | # Things related to IPython's various namespaces |