DebugClients/Python/DebugBase.py

changeset 935
bf9ee1e00bc5
parent 826
2e3e2055e715
child 945
8cd4d08fa9f6
child 1476
7d7710aeeab9
--- a/DebugClients/Python/DebugBase.py	Fri Mar 04 20:03:47 2011 +0100
+++ b/DebugClients/Python/DebugBase.py	Thu Mar 10 10:27:57 2011 +0100
@@ -62,6 +62,7 @@
         
         # current frame we are at
         self.currentFrame = None
+        self.currentFrameLocals = None
         
         # frame that we are stepping in, can be different than currentFrame
         self.stepFrame = None
@@ -85,6 +86,14 @@
         """
         return self.currentFrame        
     
+    def getCurrentFrameLocals(self):
+        """
+        Public method to return the locals dictionary of the current frame.
+        
+        @return locals dictionary of the current frame
+        """
+        return self.currentFrameLocals        
+    
     def step(self, traceMode):
         """
         Public method to perform a step operation in this thread.
@@ -527,6 +536,8 @@
             self._dbgClient.mainFrame = frame
 
         self.currentFrame = frame
+        self.currentFrameLocals = frame.f_locals
+        # remember the locals because it is reinitialized when accessed
         
         fr = frame
         stack = []

eric ide

mercurial