For information on setup and debugging a CLR stored procedure in a direct-debug scenario by “stepping-through” the code from within Visual Studio, OR by using a test TSQL script from with Visual Studio, refer to the following MSDN article: http://msdn.microsoft.com/en-us/library/ms165051.aspxNow, suppose you have a stored procedure already deployed to a remote SQL Server that you need to debug by setting a break-point because you don’t know what condition is leading to the code path that is taken – you don’t know what input variables to provide to “step-through” the code from within Visual Studio using a direct debug by right clicking the stored procedure and selecting “Step Into”. Or perhaps, you want to set a conditional breakpoint to halt execution under a certain situation… NOTICE: Do not do this on a production server – you will halt execution of all managed threads on the SQL Server and can lead to a crash of the SQL Server – only perform this on a development server!!!In the following example, we have a CLR Stored Procedure in the AdventureWorksPTO database on a remote SQL Server – SQLTEST100 (a SQL Server 2008 box running on Windows 2008 R2). The AdventureWorksPTO database is an enhanced version of the AdventureWorks database PFEs use in our SQL Server 2005/2008 Performance Tuning and Optimization workshops. The stored procedure is in the assembly named AdventureWorksPTO_CLR_Debug_Example. Read more: Jay's notes on SQL