87 |
87 |
88 @return the current frame |
88 @return the current frame |
89 """ |
89 """ |
90 return self.currentFrame |
90 return self.currentFrame |
91 |
91 |
92 def getCurrentFrameLocals(self): |
92 def getFrameLocals(self, frmnr=0): |
93 """ |
93 """ |
94 Public method to return the locals dictionary of the current frame. |
94 Public method to return the locals dictionary of the current frame |
95 |
95 or a frame below. |
96 @return locals dictionary of the current frame |
96 |
97 """ |
97 @keyparam frmnr distance of frame to get locals dictionary of. 0 is |
98 return self.currentFrameLocals |
98 the current frame (int) |
|
99 @return locals dictionary of the frame |
|
100 """ |
|
101 if frmnr: |
|
102 f = self.currentFrame |
|
103 while f is not None and frmnr > 0: |
|
104 f = f.f_back |
|
105 frmnr -= 1 |
|
106 return f.f_locals |
|
107 else: |
|
108 return self.currentFrameLocals |
99 |
109 |
100 def step(self, traceMode): |
110 def step(self, traceMode): |
101 """ |
111 """ |
102 Public method to perform a step operation in this thread. |
112 Public method to perform a step operation in this thread. |
103 |
113 |
822 |
832 |
823 # Eliminate things like <string> and <stdin>. |
833 # Eliminate things like <string> and <stdin>. |
824 if fn[0] == '<': |
834 if fn[0] == '<': |
825 return True |
835 return True |
826 |
836 |
827 #XXX - think of a better way to do this. It's only a convience for |
837 #XXX - think of a better way to do this. It's only a convenience for |
828 #debugging the debugger - when the debugger code is in the current |
838 #debugging the debugger - when the debugger code is in the current |
829 #directory. |
839 #directory. |
830 if os.path.basename(fn) in [ |
840 if os.path.basename(fn) in [ |
831 'AsyncFile.py', 'AsyncIO.py', |
841 'AsyncFile.py', 'AsyncIO.py', |
832 'DebugConfig.py', 'DCTestResult.py', |
842 'DebugConfig.py', 'DCTestResult.py', |