Disable easy serial for debug

Hi, I need tu run my code in debug mode, but he generates an error when it’s compiled for debug.

Building in debug mode
Linking .pio/build/uno/firmware.elf
HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':
(.text+0x0): multiple definition of `__vector_18'
avr8-stub.c.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
*** [.pio/build/uno/firmware.elf] Error 1

My research made me realize that this comes from Serial which is called in my code. I put all the Serial I have in an if condition. But the error persists. Is there a simple way to disable Serial without having to comment out all the print logs?