I would like to use the bpython interpreter for debugging. My question is similar to "Is it possible to go into ipython from code?", which asks about ipython.
If you use ipdb.set_trace()
you get a full ipython session with all of its conveniences. However, bpdb.set_trace()
doesn't give me a bpython session, it gives me the standard pdb
debugger.
Is there any way of setting things up so that I can debug within a bpython session?
Yes, using this wrapper, which you can also access by adding the statement
import bpdb
to your code. Addbpdb.set_trace()
wherever you want to break, and from thepdb
interpreter enter "B" to jump into abpython
session with everything from the stack frame:Your question seems perfectly valid to me!