DebugClients/Python3/DebugClientBase.py

branch
5_5_x
changeset 3728
3fd874bf34e4
parent 3640
2bf828881e86
child 4021
195a471c327b
--- a/DebugClients/Python3/DebugClientBase.py	Sun Jul 20 17:54:27 2014 +0200
+++ b/DebugClients/Python3/DebugClientBase.py	Thu Jul 24 22:34:05 2014 +0200
@@ -177,6 +177,7 @@
         
         # The context to run the debugged program in.
         self.debugMod = imp.new_module('__main__')
+        self.debugMod.__dict__['__builtins__'] = __builtins__
 
         # The list of complete lines to execute.
         self.buffer = ''
@@ -1295,9 +1296,11 @@
             frmnr -= 1
         
         if f is None:
-            return
-        
-        if scope:
+            if scope:
+                dict = self.debugMod.__dict__
+            else:
+                scope = -1
+        elif scope:
             dict = f.f_globals
         else:
             dict = f.f_locals
@@ -1338,9 +1341,11 @@
             frmnr -= 1
         
         if f is None:
-            return
-        
-        if scope:
+            if scope:
+                dict = self.debugMod.__dict__
+            else:
+                scope = -1
+        elif scope:
             dict = f.f_globals
         else:
             dict = f.f_locals

eric ide

mercurial