Hacker News new | ask | show | jobs
by mlader 4332 days 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.

2 comments

I 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

they did: python -m pdb my_code.py
ipdb just made my day.

Thanks.