SharePoint displays very short and user friendly error messages by default. But developers need to know the details of that errors and digging into log files can be very time consuming. In order to display error details and the stack trace of the errors, you need to modify the web.config file. This little modifications help to debug run-time problems and save lots of development time. Please keep in mind that these changes should be made in your development environment, not in your production servers.
Disable Custom Errors
[stextbox id=”grey”]
Find: <customErrors mode=”On” />
Replace with: <customErrors mode=”Off” />
[/stextbox]
Enable Call Stack Trace
[stextbox id=”grey”]
Find: <SafeMode CallStack=”false” />
Replace with: <SafeMode CallStack=”true” />
[/stextbox]
Enable Compilation Debugging
[stextbox id=”grey”]
Find: <compilation debug=”false” />
Replace with: <compilation debug=”true” />
[/stextbox]
Enable ASP.NET Tracing
[stextbox id=”grey”]Insert: <trace enabled=”true” pageOutput=”true“/>[/stextbox]