SharePoint Debugging and Feature Implementation

If the very in-depth and detailed error messages from SharePoint are leaving you wanting for more, make sure you enable debugging so you can get the full ASP.NET error. I continue to get questions on what changes to make so I’m including them here for future reference. I’m surprised that there are still lots of developer folks out there that don’t know that you can do this…., so you need to make the following 3 changes in the Web.config:

Change: <SafeMode MaxControls="200" CallStack="false" ...>

To: <SafeMode MaxControls="200" CallStack="true" ...>

-------------------------------------------------------------------------------------

Change: <customErrors mode="On" />

To: <customErrors mode="Off" />

-------------------------------------------------------------------------------------

Change: <compilation batch="false" debug="false">

To: <compilation batch="true" debug="true">

Well, wouldn’t it be great if you can wrap this capability into a Feature so that debugging could be enabled / disabled on demand? Well, guess what, you can and someone did. Ted Pattison discusses this in his blog post and also provides the code for download, SharePointDebugger.zip. It also serves as a great tutorial.

Great job Ted.

</steve>