Merge remote-tracking branch 'origin/master' into numpy-array-view
[idea/community.git] / python / helpers / pydev / pydevd_vars.py
index 1dc9790b40a642cd820366121a73647a2cde43a2..a710eb7d2d0f5018b81746b4c907239d7a0f798e 100644 (file)
@@ -213,7 +213,10 @@ def getVariable(thread_id, frame_id, scope, attrs):
             var = frame.f_globals
             del attrList[0]  # globals are special, and they get a single dummy unused attribute
         else:
-            var = frame.f_locals
+            # for a frame access both locals and globals as Python does
+            var = {}
+            var.update(frame.f_globals)
+            var.update(frame.f_locals)
 
         for k in attrList:
             _type, _typeName, resolver = getType(var)