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

Function _get_frame_lineno_mapping

pydevd_plugins/jinja2_debug.py:292–306  ·  view source on GitHub ↗

:rtype: list(tuple(int,int)) :return: list((original_line, line_in_frame))

(jinja_template)

Source from the content-addressed store, hash-verified

290
291
292def _get_frame_lineno_mapping(jinja_template):
293 """
294 :rtype: list(tuple(int,int))
295 :return: list((original_line, line_in_frame))
296 """
297 # _debug_info is a string with the mapping from frame line to actual line
298 # i.e.: "5=13&8=14"
299 _debug_info = jinja_template._debug_info
300 if not _debug_info:
301 # Sometimes template contains only plain text.
302 return None
303
304 # debug_info is a list with the mapping from frame line to actual line
305 # i.e.: [(5, 13), (8, 14)]
306 return jinja_template.debug_info
307
308
309def _get_jinja2_template_line(frame):

Calls

no outgoing calls

Tested by

no test coverage detected