diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-02-15 11:42:00 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-02-15 11:57:41 +0300 |
commit | 0de9b4a47867a2f539f7f5f02078bc353f6fb044 (patch) | |
tree | e60d2593309655d66f72d1a61ea42980313379ca /contrib/python/ipython/py3/IPython/core/debugger.py | |
parent | 6ecbb0cbb39049f5c9166871ffd217e60d3494bf (diff) | |
download | ydb-0de9b4a47867a2f539f7f5f02078bc353f6fb044.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) |