Print Line Numbers

Is there a way to print the sketches line numbers. When I print the sketch it does not include the line numbers. I want them because it helps me in locating the section of sketch I need to update or correct.

RocketNut:
Is there a way to print the sketches line numbers. When I print the sketch it does not include the line numbers. I want them because it helps me in locating the section of sketch I need to update or correct.

Under file preferences

I have the “Display line numbers” enabled, when I print it out on my printer the line numbers do not print.

Thanks for the help :slight_smile:

Use the Notpad++ editor

You can also create a sketch that reads a text (source code) form serial and prints them back with line numbers.

That way you can even add features like stripping comments from code or

Try this:
https://tttapa.github.io/Tools/Arduino-Code-Printer.html

Pieter

PieterP:
Try this:
Code Printer

Pieter

Thanks

For the link, it will help out a lot. I have a question tho. The library functions that appear orange in the sketch IDE print out very faded and hard to read. Is there a way I change the color of these keywords (red would nice)?

RocketNut:
I have a question tho. The library functions that appear orange in the sketch IDE print out very faded and hard to read. Is there a way I change the color of these keywords (red would nice)?

Just open the raw HTML in a text editor before pasting it on the web page and search and replace for the orange color ("#d35400") and replace it with red ("#ff0000"). If you want a darker red, just use #aa0000 for example.

Thanks for the tip. :slight_smile: :slight_smile: :slight_smile: It did the trick.