Thursday, July 19, 2007

MOSS: Debugging

The debugging process in MOSS is challenging, to say the least, especially if your "development" mostly consists of modifying CAML in XML files.

Some tips:

  • Switch off Custom Errors and Enable Callstack; especially helpful if you are doing a lot of coding against the API
  • Minimize the number of changes between each deployment and test - SharePoint loves to throw "unknown error"s for the seemingly most minor issue, especially in ONET and Schema files, and tracking down just which change caused the issue is not easy
  • Recycle the app pool instead of doing an IISReset
  • Minimize the number of tedious manual actions for deployments of your changes by creating batch files to copy and paste files, etc.  Learn which files can be simply copied to the 12-hive to affect a change, and which require GACing, instantiation of new MOSS objects, etc.
  • Use the IE Developer Toolbar to make sense of the client-side code (html, IDs, styles, classes, JS, etc)
  • Check the log files at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS.  These files may or may not be helpful.
  • Create your own logging/trace mechanism for your code to supplement the SharePoint logs.

Labels: , ,


Post a Comment

<< Home