| 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): |