Description
I love bpython!
I haven't dived into the codebase too deeply, but would it be easy to expose the globals when performing post-mortem debugging? Right now I can only access the locals in the bpython debugger - to interact with the globals (for instance, debugging functions I might have defined in the same module as the function the pm debugging is in), I have to drop out of bpdb, losing all of it's benefits.
def debug():
print('global debugging!')
def broken():
def internal_debug():
print('local debugging!')
do_bad_thing_here() # pm debugging drops me here
in the above example, I can do >>> intern<tab>
, and get internal_debug
to complete and get its help, and run it, but if I try to do >>> debug()<enter>
I get an error about the name "debug" not being defined.
I can do >>> exit()
to get back to (BPdb)
and then do (BPdb) debug()<enter>
and debug
is available and executes correctly.
I've found code that looks like it's only exposing the locals (
Line 47 in 2349722
I'll circle back and investigate more, but on the chance someone else knows better or gets to a PR first, I figured I'd post this issue.