I have a code that should run only in debug mode.
Is it better to use HttpContext.Current.IsDebuggingEnabled or "#if DEBUG ... #endif"?
Thanks,
Those are 2 completely different things!
HttpContext.Current.IsDebuggingEnabled
is related to the current web.config setting
debug=true
where
#if DEBUG ... #endif
is related to the project configuration debug/release setting at build time
Be carefull!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With