summaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/core/debugger.py
diff options
context:
space:
mode:
authorMaxim Yurchuk <[email protected]>2024-10-20 00:06:50 +0300
committerGitHub <[email protected]>2024-10-20 00:06:50 +0300
commite0b481c6710337ae655271bbb80afe6ac81a5614 (patch)
treedba67dc017935800d0c3f8dc967e9522c5302bd2 /contrib/python/ipython/py3/IPython/core/debugger.py
parent07f2e60d02d95eab14a86a4b9469db1af7795001 (diff)
parentf04ad7e5462f5910ef95f2efd15c509e539ae62d (diff)
Merge pull request #10642 from ydb-platform/mergelibs-241019-1758
Library import 241019-1758
Diffstat (limited to 'contrib/python/ipython/py3/IPython/core/debugger.py')
-rw-r--r--contrib/python/ipython/py3/IPython/core/debugger.py31
1 files changed, 27 insertions, 4 deletions
diff --git a/contrib/python/ipython/py3/IPython/core/debugger.py b/contrib/python/ipython/py3/IPython/core/debugger.py
index a858972bb5c..e7a0b8fb554 100644
--- a/contrib/python/ipython/py3/IPython/core/debugger.py
+++ b/contrib/python/ipython/py3/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):