This KB article shows how to enable Dynamic Debug Compilation, and modify Custom Errors mode in the web.config.
1. In your site's web.config , locate the following key:
<compilation debug=" " targetFramework=" ">
2. Set the value to true to insert debugging information into the compiled page; the exact wording of the key might vary depending on the version of .NET installed.
3. To deactivate or modify Custom Errors mode, find the following key in your site's web.config file:
<customErrors mode=" ">
Available values are as follows:
- On to always display custom (friendly) messages.
- Off to always display detailed ASP.NET error information.
- RemoteOnly to display custom (friendly) messages only to sessions not originating from the local web server itself.
Additionally, you may need to also set this same value in a second web.config file, located within the \Workarea subfolder of your site's root.
NOTE : You should never enable the debug key in production environments unless you are testing an issue, because it can cause performance issues.