Tip of the day for developing under SPS-

If you get “Debugging is not supported under current trust level settings“ when trying to attach to the w3wp.exe process from VS, modify the following line in your web.config:

<trust level="WSS_Minimal" originUrl="" />   

change it to:

<trust level="Full" originUrl="" />