When I'm coding, depending on the programming language, I usually like to sprinkle debugging statements into my code to see data, code decisions and general information while the program is executing. Using the Arduino, I can use the Serial library to stream print statements to the Serial Monitor for example.
Option 1: In code #if
The first option is very simple. At the top of your source file, you put in the following line when you want to turn debugging code on: