4 ms·
I've been a Python developer for more than ten years. Approximately 98% of the time I need to debug something I use print() statements and this: import IPyth
by drpancake 6y ago
I've been a Python developer for more than ten years. Approximately 98% of the time I need to debug something I use print() statements and this:
import IPython; IPython.embed()
- justmyname 6y agoOh, having full ipython during debug investigations is much better than using pure pdb.set_trace(). Thank you.
- drpancake 6y agoYou might find this useful: https://github.com/gotcha/ipdb https://github.com/gotcha/ipdb
- quickthrower2 6y agoI've been a Python developer for less than 10 hours. Approximately 98% of the time debugged something was in Visual Studio. Quite a nice experience. I was lucky to have the project already set up for me.
- trymas 6y agoCan you step through the code when embedding ipython in your code? Does this approach have advantages versus `ipdb` or `pdb++` ?
- mbar84 6y agoAre you aware of this: import pudb; pudb.set_trace()
- musingsole 6y agoThis has been my go-to debug method for years now. Find a critical section of code, drop the embed call there (with maybe a print statement or two leading up to it for context). For stepping through code, I agree with your other comments that it is often too much for debugging. To recreate it when really necessary, I might sprinkle a handful of embed calls