d(own) [count] Move the current frame count (default one) levels down in the stack trace (to a newer frame). Will skip hidden frames.
(self, arg)
| 730 | ) |
| 731 | |
| 732 | def do_down(self, arg): |
| 733 | """d(own) [count] |
| 734 | Move the current frame count (default one) levels down in the |
| 735 | stack trace (to a newer frame). |
| 736 | |
| 737 | Will skip hidden frames. |
| 738 | """ |
| 739 | if self.curindex + 1 == len(self.stack): |
| 740 | self.error("Newest frame") |
| 741 | return |
| 742 | try: |
| 743 | count = int(arg or 1) |
| 744 | except ValueError: |
| 745 | self.error("Invalid frame count (%s)" % arg) |
| 746 | return |
| 747 | if count < 0: |
| 748 | _newframe = len(self.stack) - 1 |
| 749 | else: |
| 750 | _newindex = self.curindex |
| 751 | counter = 0 |
| 752 | skipped = 0 |
| 753 | hidden_frames = self.hidden_frames(self.stack) |
| 754 | for i in range(self.curindex + 1, len(self.stack)): |
| 755 | frame = self.stack[i][0] |
| 756 | if hidden_frames[i] and self.skip_hidden: |
| 757 | skipped += 1 |
| 758 | continue |
| 759 | counter += 1 |
| 760 | if counter >= count: |
| 761 | break |
| 762 | else: |
| 763 | self.error("all frames bellow hidden") |
| 764 | return |
| 765 | |
| 766 | Colors = self.color_scheme_table.active_colors |
| 767 | ColorsNormal = Colors.Normal |
| 768 | if skipped: |
| 769 | print( |
| 770 | f"{Colors.excName} [... skipped {skipped} hidden frame(s)]{ColorsNormal}\n" |
| 771 | ) |
| 772 | _newframe = i |
| 773 | |
| 774 | self._select_frame(_newframe) |
| 775 | |
| 776 | do_d = do_down |
| 777 | do_u = do_up |
nothing calls this directly
no test coverage detected