##// END OF EJS Templates
Always display last frame when show tracebacks with hidden frames....
Matthias Bussonnier -
Show More
@@ -290,7 +290,7 b' class Pdb(OldPdb):'
290
290
291 def hidden_frames(self, stack):
291 def hidden_frames(self, stack):
292 """
292 """
293 Given an index in the stack return wether it should be skipped.
293 Given an index in the stack return whether it should be skipped.
294
294
295 This is used in up/down and where to skip frames.
295 This is used in up/down and where to skip frames.
296 """
296 """
@@ -713,7 +713,9 b' class Pdb(OldPdb):'
713 break
713 break
714 else:
714 else:
715 # if no break occured.
715 # if no break occured.
716 self.error("all frames above hidden")
716 self.error(
717 "all frames above hidden, use `skip_hidden False` to get get into those."
718 )
717 return
719 return
718
720
719 Colors = self.color_scheme_table.active_colors
721 Colors = self.color_scheme_table.active_colors
@@ -756,7 +758,9 b' class Pdb(OldPdb):'
756 if counter >= count:
758 if counter >= count:
757 break
759 break
758 else:
760 else:
759 self.error("all frames bellow hidden")
761 self.error(
762 "all frames bellow hidden, use `skip_hidden False` to get get into those."
763 )
760 return
764 return
761
765
762 Colors = self.color_scheme_table.active_colors
766 Colors = self.color_scheme_table.active_colors
@@ -699,9 +699,10 b' class VerboseTB(TBTools):'
699
699
700 frames = []
700 frames = []
701 skipped = 0
701 skipped = 0
702 for r in records:
702 lastrecord = len(records) - 1
703 for i, r in enumerate(records):
703 if not isinstance(r, stack_data.RepeatedFrames) and self.skip_hidden:
704 if not isinstance(r, stack_data.RepeatedFrames) and self.skip_hidden:
704 if r.frame.f_locals.get("__tracebackhide__", 0):
705 if r.frame.f_locals.get("__tracebackhide__", 0) and i != lastrecord:
705 skipped += 1
706 skipped += 1
706 continue
707 continue
707 if skipped:
708 if skipped:
General Comments 0
You need to be logged in to leave comments. Login now