##// END OF EJS Templates
Fix settrace for recursive debugger
Quentin Peter -
Show More
@@ -588,6 +588,7 b' class Pdb(OldPdb):'
588 argument (which is an arbitrary expression or statement to be
588 argument (which is an arbitrary expression or statement to be
589 executed in the current environment).
589 executed in the current environment).
590 """
590 """
591 trace_function = sys.gettrace()
591 sys.settrace(None)
592 sys.settrace(None)
592 globals = self.curframe.f_globals
593 globals = self.curframe.f_globals
593 locals = self.curframe_locals
594 locals = self.curframe_locals
@@ -598,7 +599,7 b' class Pdb(OldPdb):'
598 self.message("ENTERING RECURSIVE DEBUGGER")
599 self.message("ENTERING RECURSIVE DEBUGGER")
599 sys.call_tracing(p.run, (arg, globals, locals))
600 sys.call_tracing(p.run, (arg, globals, locals))
600 self.message("LEAVING RECURSIVE DEBUGGER")
601 self.message("LEAVING RECURSIVE DEBUGGER")
601 sys.settrace(self.trace_dispatch)
602 sys.settrace(trace_function)
602 self.lastcmd = p.lastcmd
603 self.lastcmd = p.lastcmd
603
604
604 def do_pdef(self, arg):
605 def do_pdef(self, arg):
General Comments 0
You need to be logged in to leave comments. Login now