DebugClients/Python/ThreadExtension.py

branch
maintenance
changeset 5591
ac539bb30eb1
parent 5561
5fffb5cc1a88
child 5598
0e59df936fb6
equal deleted inserted replaced
5578:3f0234901b2f 5591:ac539bb30eb1
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