14

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?

BIBD
  • 15,107
  • 25
  • 85
  • 137
Jader Dias
  • 88,211
  • 155
  • 421
  • 625

4 Answers4

9

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
  • 84,552
  • 17
  • 108
  • 152
8

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
  • 47,715
  • 17
  • 91
  • 122
4

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

Jamie Ide
  • 48,427
  • 16
  • 81
  • 117
3

Yes Release will compile a smaller DLL

WACM161
  • 1,013
  • 2
  • 9
  • 20