Tuesday, March 20, 2012

Cannot debug activated CLR Stored Procedure

Hi

I'm having a problem debugging (with VS2005,) a CLR Stored Procedure which is activated on a queue. I know it is working because it is consuming and processing messages when one appears in the queue.

I can debug it 'manually' by either right-clicking on the SP within VS2005 and selecting 'Step into Stored Procedure' or by attaching to the SQL Server Management Studio process, setting a breakpoint and executing the stored procedure from a Management Studio query window.

However, if I send a message to my queue within Management Studio, my breakpoints are NOT being hit within VS2005, but the message IS reaching my queue and it IS being processed by the SP.

Can anyone help?

Thanks

The only way to debug this is by attaching VS debugger directly to sqlservr.exe (i.e. the database engine) for managed debugging. You will need to install the Visual Studio Remote Debugger on the machine running the engine and you will need to add symbols to your assembly.

Hope that helps,

Rushi

No comments:

Post a Comment