Use marco to define flag variable

image_pdfimage_print
   
 


#define DEBUGGING

using System;

class Starter {
#if DEBUGGING
    static void OutputLocals() {
        Console.WriteLine("debugging...");
    }
#endif
    static void Main() {
#if DEBUGGING
        OutputLocals();
#endif
    }
}