Show More
@@ -545,6 +545,25 b' class Pdb(OldPdb):' | |||||
545 | self.print_list_lines(self.curframe.f_code.co_filename, lineno, last) |
|
545 | self.print_list_lines(self.curframe.f_code.co_filename, lineno, last) | |
546 | do_ll = do_longlist |
|
546 | do_ll = do_longlist | |
547 |
|
547 | |||
|
548 | def do_debug(self, arg): | |||
|
549 | """debug code | |||
|
550 | Enter a recursive debugger that steps through the code | |||
|
551 | argument (which is an arbitrary expression or statement to be | |||
|
552 | executed in the current environment). | |||
|
553 | """ | |||
|
554 | sys.settrace(None) | |||
|
555 | globals = self.curframe.f_globals | |||
|
556 | locals = self.curframe_locals | |||
|
557 | p = self.__class__(completekey=self.completekey, | |||
|
558 | stdin=self.stdin, stdout=self.stdout) | |||
|
559 | p.use_rawinput = self.use_rawinput | |||
|
560 | p.prompt = "(%s) " % self.prompt.strip() | |||
|
561 | self.message("ENTERING RECURSIVE DEBUGGER") | |||
|
562 | sys.call_tracing(p.run, (arg, globals, locals)) | |||
|
563 | self.message("LEAVING RECURSIVE DEBUGGER") | |||
|
564 | sys.settrace(self.trace_dispatch) | |||
|
565 | self.lastcmd = p.lastcmd | |||
|
566 | ||||
548 | def do_pdef(self, arg): |
|
567 | def do_pdef(self, arg): | |
549 | """Print the call signature for any callable object. |
|
568 | """Print the call signature for any callable object. | |
550 |
|
569 |
General Comments 0
You need to be logged in to leave comments.
Login now