Better SharePoint Debugging 

Tags: MOSS

In many cases it is not too hard to debug a web part.  By adding enough throw...catch statements usually the error can be discovered and resolved.  However, what happens if the error is really in the web.config?  Here is how to make SharePoint help with the debugging.  I cannot stress this enough...use only for debugging and generally only on development machines!  When you are done return the changes to their default values!

   

First find the customErrors node in the web.config file.  By default it is <customErrors mode="On"/>.  Change this to <customErrors mode="Off"/>.  Next search for the CallStack element in the SafeMode node.  By default it is CallStack="false".  Change this to CallStack="true" and the next time you have an error on one of your pages SharePoint will dump the call stack for you.

   

I do NOT recommend you leave these settings in the production environment, but it is SO helpful when all else seems to fail.

   

Reference

 
Posted by David McWee on 11-Oct-07
0 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 
Name:
URL:
Email:
Comments: