Control Surface master MIDI Control Surface library for Arduino
Debug
examples/Arduino-Helpers/Debug for example usage.

If you are going to be debugging a lot, it might be useful to just add a menu option in the IDE to disable/enable debugging.
This can be done relatively easily by editing the boards.txt file.

Open the boards.txt file of the board you are using. If you're using version 1.8.x of the Arduino IDE, it'll be located in ~/.arduino15/packages/<package-name>/hardware/<architecture>/<version>/ or C:\users\<username>\AppData\Local\Arduino15\packages\<package-name>\hardware\<architecture>\<version>\.
Open it using a text editor (e.g. Gedit on Linux, or Notepad on Windows).

First, create the menu option by adding the following line at the top of the file:

For example, if you're using an Arduino UNO:

If your board already has an extra_flags entry, just add {build.debug_output} to the end (separated by a space). For example:
If you now open your the Tools menu in the Arduino IDE, you should see the debug options: