Why Set debug=”false” When retail=”true” is Already Set in .NET Framework 2

Over time many developers have been caught by someone leaving the debug=”true” set in their production environment. To work around this some development shops implement a formal release process and set the retail=”true” element in the machine.config.

The retail=”true” will disable many of the debug aspects such as tracing, compilation etc. When you are debugging an application you do not want it to timeout before you are done so if the debug=”true” element is set the timeout is increased to a very high value (even if you have configured). The retail=”true” setting does not override this and as a result you may see an increased memory usage due to long running pages.

A good release process coupled with the appropriate combination of retail and debug settings will assist you in ensuring your applications perform as expected.