One of the coolest features found in the integration of the .NET Framework, Visual Studio 2005, and SQL Server 2005 is the ability to debug the CLR database objects that you create:
http://m.makesdatawork.net/ShowArticle.aspx?ID=146