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

Function _get_line

_pydevd_bundle/pydevd_collect_bytecode_info.py:65–75  ·  view source on GitHub ↗
(op_offset_to_line, op_offset, firstlineno, search=False)

Source from the content-addressed store, hash-verified

63
64
65def _get_line(op_offset_to_line, op_offset, firstlineno, search=False):
66 op_offset_original = op_offset
67 while op_offset >= 0:
68 ret = op_offset_to_line.get(op_offset)
69 if ret is not None:
70 return ret - firstlineno
71 if not search:
72 return ret
73 else:
74 op_offset -= 1
75 raise AssertionError("Unable to find line for offset: %s.Info: %s" % (op_offset_original, op_offset_to_line))
76
77
78def debug(s):

Callers 2

collect_return_infoFunction · 0.85
collect_try_except_infoFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected