Extract key information from this great explanation
#if DEBUG: The code in here won’t even reach the IL on release.
[Conditional("DEBUG")]: This code will reach the IL, however calls to the method will be omitted unless DEBUG is set when the caller is compiled.
Common Best Practice
#if DEBUGfor different variable assignment.
[Conditional("DEBUG")]for method invocation.