Enable Debugging in Web.Config


Versions:  2008,2010
Published:  12/14/2010
Code:  vstipProj0026

 

If you have ever created a web project in Visual Studio then you have undoubtedly encountered this dialog:

image

 

 

A quick read tells you that it will modify the Web.config file to enable debugging:

image

 

 

There are a couple of things to point out here:

1.  You can avoid the dialog by editing your Web.config file manually and setting debug to true.

2.  There is a dialog to have you turn on debugging but there is NOT one to have you turn it off again before you deploy to production.

Comments (2)
  1. dmuri says:

    We don't necessarily need to remember to turn off "Debug" because VS 2010 has transforms that help modify the web.config file when you deploy.

  2. zainnab says:

    True but isn't it still considered a best practice to turn it off in the main config file just in case you miss it in one of the transforms?

Comments are closed.

Skip to main content