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

Function can_skip

pydevd_plugins/jinja2_debug.py:352–373  ·  view source on GitHub ↗
(pydb, frame)

Source from the content-addressed store, hash-verified

350
351
352def can_skip(pydb, frame):
353 if pydb.jinja2_breakpoints and _is_jinja2_render_call(frame):
354 filename = _get_jinja2_template_original_filename(frame)
355 if filename is not None:
356 canonical_normalized_filename = canonical_normalized_path(filename)
357 jinja2_breakpoints_for_file = pydb.jinja2_breakpoints.get(canonical_normalized_filename)
358 if jinja2_breakpoints_for_file:
359 return False
360
361 if pydb.jinja2_exception_break:
362 name = frame.f_code.co_name
363
364 # errors in compile time
365 if name in ("template", "top-level template code", "<module>") or name.startswith("block "):
366 f_back = frame.f_back
367 module_name = ""
368 if f_back is not None:
369 module_name = f_back.f_globals.get("__name__", "")
370 if module_name.startswith("jinja2."):
371 return False
372
373 return True
374
375
376is_tracked_frame = _is_jinja2_render_call

Callers

nothing calls this directly

Calls 4

_is_jinja2_render_callFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected