Skip to content

Commit d78d0bb

Browse files
author
Philip Guo
committed
started adding support for column numbers
1 parent e11a663 commit d78d0bb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎v3/pg_logger.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,14 @@ def create_encoded_stack_entry(cur_frame):
868868
heap=self.encoder.get_heap(),
869869
stdout=get_user_stdout(tos[0]))
870870

871+
# optional column numbers for greater precision
872+
# (only relevant in a hacked CPython that supports column numbers)
873+
if hasattr(frame, 'f_colno'):
874+
# -1 is an invalid column number
875+
if frame.f_colno >= 0:
876+
trace_entry['column'] = frame.f_colno
877+
878+
871879
# TODO: refactor into a non-global
872880
global __html__, __css__, __js__
873881
if __html__:

0 commit comments

Comments
 (0)