diff options
author | andrey1931 <andrey1931@yandex-team.com> | 2023-11-22 11:33:57 +0300 |
---|---|---|
committer | andrey1931 <andrey1931@yandex-team.com> | 2023-11-22 13:00:36 +0300 |
commit | 841d152d111ac193cf0e7766c0e34168c39972e0 (patch) | |
tree | 8bb0baf54c08000760cf6cbec9bef3474c2d618e /contrib/python/ipython/py3 | |
parent | a387030042c8467e0cc611f6cb90b5563bd2b04c (diff) | |
download | ydb-841d152d111ac193cf0e7766c0e34168c39972e0.tar.gz |
fix: ipdb по команде where показывал контекст одного того же фрейма для всего стека вызовов
После https://a.yandex-team.ru/review/4887980/details, команда where стала показывать контекст вызванной строки для каждого фрейма из стека вызовов. Но из-за ошибки всегда показывался одинаковый контекст действующего фрейма
Diffstat (limited to 'contrib/python/ipython/py3')
-rw-r--r-- | contrib/python/ipython/py3/IPython/core/debugger.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/python/ipython/py3/IPython/core/debugger.py b/contrib/python/ipython/py3/IPython/core/debugger.py index 26bd45ff94..389592d066 100644 --- a/contrib/python/ipython/py3/IPython/core/debugger.py +++ b/contrib/python/ipython/py3/IPython/core/debugger.py @@ -616,7 +616,7 @@ class Pdb(OldPdb): ret.append("%s(%s)%s\n" % (link, lineno, call)) start = lineno - 1 - context//2 - lines = linecache.getlines(filename, self.curframe.f_globals) + lines = linecache.getlines(filename, frame.f_globals) start = min(start, len(lines) - context) start = max(start, 0) lines = lines[start : start + context] |