For my production sites I usually change the "debug" flag in the Web.Config to "false". But I always publish my sites with the Configuration Manager set to "Debug". Should I change this setting too?
Visual Studio projects have separate release and debug configurations for your program. You build the debug version for debugging and the release version for the final release distribution. In debug configuration, your program compiles with full symbolic debug information and no optimization.
By default, Debug includes debug information in the compiled files (allowing easy debugging) while Release usually has optimizations enabled. As far as conditional compilation goes, they each define different symbols that can be checked in your program, but they are language-specific macros.
Applies to: Visual Studio for Mac Visual Studio. Build configurations give you precise control over a build allowing you to create configurations to cater to different testing and distribution situations. You can create build configurations for individual projects or on a solution-wide basis.
Lots of your code could be completely removed or rewritten in Release mode. The resulting executable will most likely not match up with your written code. Because of this release mode will run faster than debug mode due to the optimizations.
Yes, you should - though if it makes a difference is dependent on how your website is coded. Only precompiled sites (Web Application Projects) or Class Libraries in the same solution will care. ASP.NET sites (Website Projects) will be compiled on the server, and will check web.config for it's debug setting.
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