Rules

Secret ingredients to quality software

Do you remove the debug attribute in Web.config compilation element?

Last updated by Tiago Araujo on 24 Aug 2016 10:30 pm (almost 5 years ago) See History

The debug attribute in the web.config file is very useful for ASP.NET developers. When an error occurs the developer gets detailed error report containing the stack trace, line number and what the error is.

But when debug attribute in the Web.config file is set to true it generates symbolic information (.pdb file) every time the compiler compiles your views as well as disables code optimization. So, it slows down the execution of every page.

So if you are a developer remember to remove the debug attribute and instead use custom error messages for your web pages

We have a program called SSW Code Auditor to check for this rule.

Adam CoganAdam Cogan

We open source. This page is on GitHub