From 4931481095fca4a02ceb7a3e74b24c4725907899 2024-09-02 10:01:17 From: M Bussonnier Date: 2024-09-02 10:01:17 Subject: [PATCH] more infor about ipdb configuration --- diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index 0a524eb..937b6e8 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -14,14 +14,35 @@ Among other things, this subclass of PDB: - hide frames in tracebacks based on `__tracebackhide__` - allows to skip frames based on `__debuggerskip__` + +Global Configuration +-------------------- + +The IPython debugger will by read the global ``~/.pdbrc`` file. +That is to say you can list all comands supported by ipdb in your `~/.pdbrc` +configuration file, to globally configure pdb. + +Example:: + + # ~/.pdbrc + skip_predicates debuggerskip false + skip_hidden false + context 25 + +Features +-------- + +The IPython debugger can hide and skip frames when printing or moving through +the stack. This can have a performance impact, so can be configures. + The skipping and hiding frames are configurable via the `skip_predicates` command. By default, frames from readonly files will be hidden, frames containing -``__tracebackhide__=True`` will be hidden. +``__tracebackhide__ = True`` will be hidden. -Frames containing ``__debuggerskip__`` will be stepped over, frames who's parent -frames value of ``__debuggerskip__`` is ``True`` will be skipped. +Frames containing ``__debuggerskip__`` will be stepped over, frames whose parent +frames value of ``__debuggerskip__`` is ``True`` will also be skipped. >>> def helpers_helper(): ... pass @@ -1070,7 +1091,9 @@ class Pdb(OldPdb): raise ValueError() self.context = new_context except ValueError: - self.error("The 'context' command requires a positive integer argument.") + self.error( + f"The 'context' command requires a positive integer argument (current value {self.context})." + ) class InterruptiblePdb(Pdb):