Debugging and Trouble Shooting in WSS3.0 and MOSS

The followings are a few things that you can use to debug and trouble shoot your custom code in MOSS development environment.


  • Out-Of-The-Box (OOTB) SharePoint logs: The log can be located @ C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS. The detail level of the information can be setup in the Central Administrator. There are a lot of information in those log files. Fortunately, there are tools out there to help you parse and filter the logs (i.e. SpsDev.com ULS Log Reader).
  • Sometimes you'll get unexpected error has occurred on a web page and there is no other information to help you debugging this issue. There is a great post that shows you how you can get rid of the useless unexpected error page and get the standard ASP.net error page for debugging.

Change the following line in the web.config

<SafeMode MaxControls=“200“ CallStack=“false“…

to

<SafeMode MaxControls=“200“ CallStack=“true“…

and you'll also need to set custom errors to 'Off'

<customErrors mode=“Off“>

  • One more thing that you can do for custom code is to step through the code. For me, I have a hard time figure which w3p.exe to attach. I usually attach all of w3p.exe that I can find and that usually helps. However, I still haven't find a way to step through my feature receiver code. If I ever find a way, I'll updated this post.

Comments

Popular posts from this blog

SharePoint 2013 App Details Page Error

SharePoint 2013 - Working with Display Template for Content Search Web Part

SharePoint 2013 Features Information List