During compile time I can do a check like
#if DEBUG
Log("something");
#endif
But what would be the preferred to check if debug="false"
is set in Web.config during runtime?
HttpContext.IsDebuggingEnabled
https://learn.microsoft.com/en-us/dotnet/api/system.web.httpcontext.isdebuggingenabled