I thought I would enumerate the steps required to conduct debugging when developing an ASP.NET Web Part for WSS 3.0/SharePoint 2007.
Situation:
Without debugging capabilities and the ability to step through code of a web part, developers are relegated to deploying their assembly to the SharePoint virtual directory and waiting for the output. The developer can only do things like Response.Write programatic elements in response to .NET exceptions that are displayed in SharePoint when the web part doesn't work as expected.
You know you need debugging of ASP.NET web parts in WSS 3.0/MOSS when:
Solution:
Based on this and some real life experiences that shaped my article "Team-Based Development in Microsoft Office SharePoint Server 2007" (http://msdn2.microsoft.com/en-us/library/bb428899.aspx), here are some ways to make web part development (assembly-based development) in WSS 3.0/MOSS easier. The first tennant is that I would prompt everyone to develop on their own VM with the following rudimentary specifications
This beats working on a shared server conducting development because firstly, you are working locally with the MOSS object model so the voodo about getting remote debugging to work is moot. Secondly, you don't have to coordinate server reboots, iisresets, etc. You can take your development environment home and work detached from the corporate network.
Because the development environment is local, debuging is easier as well. Based on the screenshot below, you can see that the attached to process works well because we are on the local machine:
The basic steps are as follows:
Hopefully now, rather than climbing thorugh stack traces, Response.Write output, etc. you can conduct full-fidelity debugging and shave days off of a task that would only take hours.