How to use #define in a library I'm trying to write?
Not a direct answer to your question, but I would suggest a different
approach based on streaming output, as described in the Arduino
Playground: Adding Streaming (insertion-style) Output. In
a nutshell, you define the &lt;&lt; operator for Serial (and any other
object that inherits from Print) in a way that allows you to write
things like:

Serial &lt;&lt; "My name is " &lt;&lt; name &lt;&lt; " and I am " &lt;&lt; age &lt;&lt; " years old.";


Now you can define a Debug object which would be, depending on whether
you want debugging output or not:


an alias to Serial
a dummy object that just discards its input.


Example:

#define DEBUG_ON

// From https://playground.arduino.cc/Main/StreamingOutput
template&lt;class T&gt; inline Print&amp; operator&lt;&lt;(Print &amp;obj, T arg)
{ obj.print(arg); return obj; }

#ifdef DEBUG_ON
# define Debug Serial
#else
class DummyStream {
public:
    template&lt;class T&gt; DummyStream&amp; operator&lt;&lt;(T arg)
    { (void) arg; return *this; }
} Debug;
#endif

void setup()
{
    const unsigned long BAUDRATE = 9600;
    Serial.begin(BAUDRATE);
    Debug &lt;&lt; "Serial port open at " &lt;&lt; BAUDRATE &lt;&lt; " bps\r\n";
}