MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / do_debug

Method do_debug

tools/python-3.11.9-amd64/Lib/pdb.py:1161–1179  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

messageMethod · 0.95
_error_excMethod · 0.95
PdbClass · 0.85
stripMethod · 0.80

Tested by

no test coverage detected