debug code Enter a recursive debugger that steps through the code argument (which is an arbitrary expression or statement to be executed in the current environment).
(self, arg)
| 1159 | do_j = do_jump |
| 1160 | |
| 1161 | def do_debug(self, arg): |
| 1162 | """debug code |
| 1163 | Enter a recursive debugger that steps through the code |
| 1164 | argument (which is an arbitrary expression or statement to be |
| 1165 | executed in the current environment). |
| 1166 | """ |
| 1167 | sys.settrace(None) |
| 1168 | globals = self.curframe.f_globals |
| 1169 | locals = self.curframe_locals |
| 1170 | p = Pdb(self.completekey, self.stdin, self.stdout) |
| 1171 | p.prompt = "(%s) " % self.prompt.strip() |
| 1172 | self.message("ENTERING RECURSIVE DEBUGGER") |
| 1173 | try: |
| 1174 | sys.call_tracing(p.run, (arg, globals, locals)) |
| 1175 | except Exception: |
| 1176 | self._error_exc() |
| 1177 | self.message("LEAVING RECURSIVE DEBUGGER") |
| 1178 | sys.settrace(self.trace_dispatch) |
| 1179 | self.lastcmd = p.lastcmd |
| 1180 | |
| 1181 | complete_debug = _complete_expression |
| 1182 |
nothing calls this directly
no test coverage detected