I have no idea why this doesn't compile. (Should be simple)

Ok so this might be something really stupid, but after searching and searching for ages I still have no idea why this doesn't work for me, while it seems to work fine for others.

All i'm trying to do is a simple preprocessor block but it just spits out the same error.

#define DEBUG 1

#ifdef DEBUG
Serial.print("Some debug stuff follows");
#endif

void setup() {
}

void loop() {
}

Surely this should print that string if DEBUG is defined, however all i get is:

"PreProcessing:5:1: error: 'Serial' does not name a type

Serial.print("Debug mode");

^

exit status 1
'Serial' does not name a type"

Please help me, i'm literally going insane.

Your Serial.print is outside any function.

Ok, i'm the worst.
I have no idea why that took me so long to comprehend.

Somewhere in my head i thought everything preprocessor related had to be declared before the main program.

Shoot me.