File tree Expand file tree Collapse file tree
trepan/processor/command/info_subcmd Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121from trepan .lib .complete import complete_token
2222from trepan .lib .disassemble import PYTHON_OPCODES as python_opcodes
2323from trepan .lib .format import Function , Keyword , format_token
24- from trepan .lib .stack import format_function_name
24+ from trepan .lib .stack import format_function_name , get_column_start_from_frame
2525from trepan .lib .thred import current_thread_name
2626from trepan .processor import frame as Mframe
2727from trepan .processor .print import format_code , format_frame
@@ -150,6 +150,13 @@ def run(self, args):
150150 formatted_text = highlight_string (line_text .strip (), style = style )
151151 self .msg_nocr (f" current line number: { frame .f_lineno } : { formatted_text } " )
152152
153+ start_column = get_column_start_from_frame (frame )
154+ if start_column >= 0 :
155+ self .msg (f" starting column: { start_column } " )
156+ else :
157+ formatted_text = highlight_string (line_text .strip (), style = style )
158+ self .msg_nocr (f" current line number: { frame .f_lineno } : { formatted_text } " )
159+
153160 f_lasti = frame .f_lasti
154161 if f_lasti >= 0 :
155162 opname = python_opcodes .opname [code .co_code [f_lasti ]]
You can’t perform that action at this time.
0 commit comments