views:

751

answers:

4

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?

+3  A: 

Yes, absolutely. Setting it to release will compile code without debugging symbols and with the right conditional compilation (i.e. #if DEBUG).

Jamie Ide
+3  A: 

Yes Release will compile a smaller DLL

WACM161
+6  A: 

Yes, as suggested in MSDN :

Enabling debug mode will greatly affect the performance of your ASP.NET application. Remember to disable debug mode before you deploy a release application or conduct performance measurements.

Canavar
Yes - but note that that refers to setting debug="false" in web.config - not the VS Solution.
Mark Brackett
+6  A: 

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.

Mark Brackett