The other day I wanted to debug an test environment where SharePoint 2010 was installed. To get informative output I made the normal changes that applies for a web application. Changed the customErrors elements mode attribute to "Off", set the debug attribute to "true" in the compilation element and set CallStack to "true" in the SafeMode element.
That would do it I thought.
After going through the different config files on the machine (machine.config and web.config) I found SharePoint 2010 has introduced a new file in the 14hive: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config
In this file the customErrors element is set to "On" which overrides all changes that has been done on the web application level... It did not take so much time to find the solution for it but it was a bit frustrating and gave me some head scratching when all the "standard" settings did not have any effect. What had I done wrong... Good to know for future SharePoint projects :)