diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-02-15 11:42:00 +0300 |
---|---|---|
committer | Innokentii Mokin <innokentii@ydb.tech> | 2024-02-16 18:35:18 +0000 |
commit | 7b5df0095abcb037bd84e4682f90c04b36796e3d (patch) | |
tree | 02de55e9d40978330b14e91aa6275ab8db1c2ba3 /contrib/python/ipython/py3/IPython/core/debugger.py | |
parent | 4a82bfdb9b900b928096ffe53670200e94ec8a23 (diff) | |
download | ydb-7b5df0095abcb037bd84e4682f90c04b36796e3d.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/ipython/py3/IPython/core/debugger.py')
-rw-r--r-- | contrib/python/ipython/py3/IPython/core/debugger.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/python/ipython/py3/IPython/core/debugger.py b/contrib/python/ipython/py3/IPython/core/debugger.py index f370070140..b409416ece 100644 --- a/contrib/python/ipython/py3/IPython/core/debugger.py +++ b/contrib/python/ipython/py3/IPython/core/debugger.py @@ -1111,10 +1111,13 @@ class InterruptiblePdb(Pdb): raise -def set_trace(frame=None): +def set_trace(frame=None, header=None): """ Start debugging from `frame`. If frame is not specified, debugging starts from caller's frame. """ - Pdb().set_trace(frame or sys._getframe().f_back) + pdb = Pdb() + if header is not None: + pdb.message(header) + pdb.set_trace(frame or sys._getframe().f_back) |