You can get more context by doing:
ipdb.set_trace(context=21)
And then, there are ways to fix the default setting too (though I guess it will involve every single virtual environment you may have there to work on, so it's ... well, it is a bit of a tradeoff):
source
I wouldn't be suprised if I wasn't the first to think that an environment variable setting would be desirable, maybe it's out there already (TODO: give it a look).
replace
def set_trace(frame=None, context=3):
with
def set_trace(frame=None, context=20):in the relevant ipdb package __main__ file, something like
/home/<yourusername>/.virtualenvs/<yourvirtualenvname>/lib/python3.5/site-packages/ipdb/__main__.py
source
I wouldn't be suprised if I wasn't the first to think that an environment variable setting would be desirable, maybe it's out there already (TODO: give it a look).
No comments:
Post a Comment