Skip to content

Commit

Permalink
Merge pull request #13000 from ccordoba12/control-print-hidden
Browse files Browse the repository at this point in the history
Allow to control if reporting hidden frames
  • Loading branch information
Carreau authored Jun 2, 2021
2 parents 378ac31 + 21f3059 commit 082890c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions IPython/core/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def __init__(self, color_scheme=None, completekey=None,
# Set the prompt - the default prompt is '(Pdb)'
self.prompt = prompt
self.skip_hidden = True
self.report_skipped = True

# list of predicates we use to skip frames
self._predicates = {"tbhide": True, "readonly": False, "ipython_internal": True}
Expand Down Expand Up @@ -766,9 +767,10 @@ def stop_here(self, frame):
if self.skip_hidden:
hidden = self._hidden_predicate(frame)
if hidden:
Colors = self.color_scheme_table.active_colors
ColorsNormal = Colors.Normal
print(f"{Colors.excName} [... skipped 1 hidden frame]{ColorsNormal}\n")
if self.report_skipped:
Colors = self.color_scheme_table.active_colors
ColorsNormal = Colors.Normal
print(f"{Colors.excName} [... skipped 1 hidden frame]{ColorsNormal}\n")
return False
return True

Expand Down

0 comments on commit 082890c

Please sign in to comment.