DebugClients/Python3/DebugBase.py

branch
5_1_x
changeset 936
f6bc16bd4198
parent 826
2e3e2055e715
child 945
8cd4d08fa9f6
child 1476
7d7710aeeab9
equal deleted inserted replaced
931:d8a11b6a7d49 936:f6bc16bd4198
59 self.__isBroken = "" 59 self.__isBroken = ""
60 self.cFrame = None 60 self.cFrame = None
61 61
62 # current frame we are at 62 # current frame we are at
63 self.currentFrame = None 63 self.currentFrame = None
64 self.currentFrameLocals = None
64 65
65 # frame that we are stepping in, can be different than currentFrame 66 # frame that we are stepping in, can be different than currentFrame
66 self.stepFrame = None 67 self.stepFrame = None
67 68
68 # provide a hook to perform a hard breakpoint 69 # provide a hook to perform a hard breakpoint
81 Public method to return the current frame. 82 Public method to return the current frame.
82 83
83 @return the current frame 84 @return the current frame
84 """ 85 """
85 return self.currentFrame 86 return self.currentFrame
87
88 def getCurrentFrameLocals(self):
89 """
90 Public method to return the locals dictionary of the current frame.
91
92 @return locals dictionary of the current frame
93 """
94 return self.currentFrameLocals
86 95
87 def step(self, traceMode): 96 def step(self, traceMode):
88 """ 97 """
89 Public method to perform a step operation in this thread. 98 Public method to perform a step operation in this thread.
90 99
534 if fn != self._dbgClient.getRunning(): 543 if fn != self._dbgClient.getRunning():
535 return 544 return
536 self._dbgClient.mainFrame = frame 545 self._dbgClient.mainFrame = frame
537 546
538 self.currentFrame = frame 547 self.currentFrame = frame
548 self.currentFrameLocals = frame.f_locals
549 # remember the locals because it is reinitialized when accessed
539 550
540 fr = frame 551 fr = frame
541 stack = [] 552 stack = []
542 while fr is not None: 553 while fr is not None:
543 # Reset the trace function so we can be sure 554 # Reset the trace function so we can be sure

eric ide

mercurial