diff options
author | andrey1931 <andrey1931@yandex-team.com> | 2023-11-21 11:11:15 +0300 |
---|---|---|
committer | andrey1931 <andrey1931@yandex-team.com> | 2023-11-21 12:23:40 +0300 |
commit | 53da909474dd9a00a009abd49fb2f8cdcdb20774 (patch) | |
tree | 9d3211379cd44ea29a1932350dd65c871d24b383 /contrib/python/ipython/py2/IPython/core/debugger.py | |
parent | cb06c8c8c566e58f3778561aa46a0992b7adfa8b (diff) | |
download | ydb-53da909474dd9a00a009abd49fb2f8cdcdb20774.tar.gz |
fix: ipdb не показывал исходный код PEERDIR'ов по команде list в py3
fix: ipdb не показывал следующую к исполнению команду в py2 и py3
ПР решает проблему https://st.yandex-team.ru/из п. 10: "не показывает текущее место в коде, на котором остановилось исполнение"
Подсмотрел решение в pdb
https://a.yandex-team.ru/arcadia/contrib/tools/python3/src/Lib/bdb.py?rev=rXXXXXX#L574
Diffstat (limited to 'contrib/python/ipython/py2/IPython/core/debugger.py')
-rw-r--r-- | contrib/python/ipython/py2/IPython/core/debugger.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/python/ipython/py2/IPython/core/debugger.py b/contrib/python/ipython/py2/IPython/core/debugger.py index f08cfb1a78..6a41b8b404 100644 --- a/contrib/python/ipython/py2/IPython/core/debugger.py +++ b/contrib/python/ipython/py2/IPython/core/debugger.py @@ -408,7 +408,7 @@ class Pdb(OldPdb): ret.append(u'%s(%s)%s\n' % (link,lineno,call)) start = lineno - 1 - context//2 - lines = ulinecache.getlines(filename) + lines = ulinecache.getlines(filename, self.curframe.f_globals) start = min(start, len(lines) - context) start = max(start, 0) lines = lines[start : start + context] |