MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / _is_same_frame

Method _is_same_frame

_pydevd_bundle/pydevd_frame.py:294–313  ·  view source on GitHub ↗
(self, target_frame, current_frame)

Source from the content-addressed store, hash-verified

292 # cdef PyDBAdditionalThreadInfo info;
293 # ELSE
294 def _is_same_frame(self, target_frame, current_frame):
295 # ENDIF
296 if target_frame is current_frame:
297 return True
298
299 info = self._args[2]
300 if info.pydev_use_scoped_step_frame:
301 # If using scoped step we don't check the target, we just need to check
302 # if the current matches the same heuristic where the target was defined.
303 if target_frame is not None and current_frame is not None:
304 if target_frame.f_code.co_filename == current_frame.f_code.co_filename:
305 # The co_name may be different (it may include the line number), but
306 # the filename must still be the same.
307 f = current_frame.f_back
308 if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[1]:
309 f = f.f_back
310 if f is not None and f.f_code.co_name == PYDEVD_IPYTHON_CONTEXT[2]:
311 return True
312
313 return False
314
315 # IFDEF CYTHON
316 # cpdef trace_dispatch(self, frame, str event, arg):

Callers 1

trace_dispatchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected