DebugClients/Python/ThreadExtension.py

branch
debugger fine grinding
changeset 5581
f8abf5f741ef
parent 5580
0f5d29acc8ea
child 5587
ea526b78ee6c
equal deleted inserted replaced
5580:0f5d29acc8ea 5581:f8abf5f741ef
201 # to get the currently executed frame, skip all frames belonging to the 201 # to get the currently executed frame, skip all frames belonging to the
202 # debugger 202 # debugger
203 while frame is not None: 203 while frame is not None:
204 baseName = os.path.basename(frame.f_code.co_filename) 204 baseName = os.path.basename(frame.f_code.co_filename)
205 if not baseName.startswith( 205 if not baseName.startswith(
206 ('DebugClientBase.py', 'DebugBase.py', 'AsyncIO.py', 206 ('DebugClientBase.py', 'DebugBase.py', 'AsyncFile.py',
207 'ThreadExtension.py', 'threading.py')): 207 'ThreadExtension.py')):
208 break 208 break
209 frame = frame.f_back 209 frame = frame.f_back
210 210
211 return frame 211 return frame
212 212
232 232
233 # adjust current frame 233 # adjust current frame
234 if "__pypy__" not in sys.builtin_module_names: 234 if "__pypy__" not in sys.builtin_module_names:
235 # Don't update with None 235 # Don't update with None
236 currentFrame = self.getExecutedFrame(frame) 236 currentFrame = self.getExecutedFrame(frame)
237 if currentFrame is not None: 237 if (currentFrame is not None and
238 self.threads[id].isBroken is False):
238 self.threads[id].currentFrame = currentFrame 239 self.threads[id].currentFrame = currentFrame
239 240
240 # Clean up obsolet because terminated threads 241 # Clean up obsolet because terminated threads
241 self.threads = {id_: thrd for id_, thrd in self.threads.items() 242 self.threads = {id_: thrd for id_, thrd in self.threads.items()
242 if id_ in frames} 243 if id_ in frames}

eric ide

mercurial