Show real line numbers in the output

Issue #12 resolved
Botond Ballo repo owner created an issue

The line numbers currently shown in the cfviz output start with the first line of the function being line 0.

A common thing to want to do after running cfviz is to set a breakpoint on one of the lines in the output, which requires entering the real line number from the underlying file.

It would be great if, instead of having to switch back to your editor to get the real line number (or using the debugger's "list" command to print the code with real line numbers), the cfviz output contained the real line numbers already.

This can be achieved fairly easily:

  • Modify the data format to add a new field which represents the real line number of the first line of the function
  • The backend, which knows the real line numbers, populates that field
  • The frontend adds that number to each displayed line number

Comments (5)

  1. Log in to comment