SharePoint OOTB displays user friendly an error page to end users. As a developer we want the .NET error page displaying detailed information about the exception thrown. By updating the web.config file with the following parameters the detailed information is displayed.
By only changing the web.config file in the web application root, located in “C:\inetpub\wwwRoot\wss\<webapp>”, will not display detailed information in application pages (a.k.a. layouts pages).
There is more than one web.config file! Check your SharePoint Root folder.
Update the configuration show above in the “…\14\TEMPLATE\LAYOUTS\web.config” file and this will result in a .NET error page for application pages.