From 1222d909f55570f5a6a34b887c9b0d045152f431 Mon Sep 17 00:00:00 2001 From: toejough Date: Wed, 7 Feb 2018 17:32:23 -0500 Subject: [PATCH] expose global vars in debugger resolves https://github.com/bpython/bpython/issues/713 --- bpdb/debugger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bpdb/debugger.py b/bpdb/debugger.py index ecd011194..704af3f9e 100644 --- a/bpdb/debugger.py +++ b/bpdb/debugger.py @@ -44,7 +44,9 @@ def postloop(self): # cmd.Cmd commands def do_Bpython(self, arg): - bpython.embed(self.curframe.f_locals, ['-i']) + locals_ = dict(**self.curframe.f_globals, **self.curframe.f_locals) + bpython.embed(locals_, ['-i']) + def help_Bpython(self): print("B(python)")