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?
To start debugging, select IIS Express (<Browser name>) or Local IIS (<Browser name>) in the toolbar, select Start Debugging from the Debug menu, or press F5. The debugger pauses at the breakpoints. If the debugger can't hit the breakpoints, see Troubleshoot debugging.
What is Online Debugging? Online debugging is a feature that allows developers or testers to test and debug websites online directly through browsers in real-world conditions. Developers get instant access to DevTools, allowing them to inspect specific components for the desired device-browser combinations.
NET Core Launch (console). Other ways to start the program in debugging mode are by pressing F5 or choosing Run > Start Debugging from the menu. Select the Terminal tab to see the "What is your name?" prompt that the program displays before waiting for a response.
HttpContext.IsDebuggingEnabled
https://docs.microsoft.com/en-us/dotnet/api/system.web.httpcontext.isdebuggingenabled
In some cases, you may need HttpContext.Current.IsDebuggingEnabled
(sort of obvious, but nonetheless)
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