Printing line numbers


(Boyd Crow) #1

I thought I used to be able to print line numbers but do not seem to be able to do so in Script Debugger 6.0.4. I can see them on the screen. Am I missing something


(Shane Stanley) #2

I don’t believe that’s ever been supported – although it has been requested before.


(Phil Stokes) #3

Dirty workaround.

  1. Save your source as a .applescript or .txt file
  2. Run the following in Terminal
awk '{print FNR "\t" $0}' /path to source/ > /path to output/

(Boyd Crow) #4

Thanks for the workaround, Phil. It reminded me that I loaded the script into a third party program editor which did support line numbers and preserved the syntax color code highlighting.