4 ms·
I typically will throw in a debugger instead of a print statement if I'm debugging locally. import ipdb; ipdb.set_trace() Then I'll explore the context variab
by mlader 12y ago
I typically will throw in a debugger instead of a print statement if I'm debugging locally.
import ipdb; ipdb.set_trace()
Then I'll explore the context variables and figure out what the hell is going on.
- est 12y agoI think 99.9999% experienced python devs do this. Why can't PSF make it default? At least some kind of commandline switch to break to last traceback context by default. e.g. python --debug my_code.py
- the_real_bto 12y agothey did: python -m pdb my_code.py
- parfe 12y agoipdb just made my day. Thanks.