Replace #ifdef DEBUG with DEBUGCODE structures