I need to step through and debug an assembly uploaded to SQL Server.
The developer who created this project was kind enough to make the comments in the script:
-- Use the following line of code to create the assembly from a file when making frequent changes to the assembly during debugging.
CREATE ASSEMBLY asm_MY_NAME FROM 'C:\myDir\myDLL.dll'
-- Use the following line of code in order to debug CLR methods in this assembly.
ALTER ASSEMBLY asm_MY_NAME
ADD FILE FROM 'C:\myDir\myDLL.pdb'
I successfully run the following two statements on a freshly compiled DLL, but I have yet to figure out how to step through the code.
This article indicates all I have to do is attach
to any client application that opens a database connection to SQL
Server
My project is a Web Applicaton. I’ve tried attaching through chrome.exe to see if the debugger catches my breakpoint.
I also tried attaching to sqlservr.exe and that did not work either.
What could I be missing to be able to step through code?
EDIT: Also tried aspnet_state.exe; no luck.
Are you sure you allow SQL CLR Debugging on your server? and note that debugging sqlclr stops ALL managed threads on sql server. (so don’t do this on production)
The following steps are required:
Allow SQLClr Debuggingin the Visual Studio Server browsersqlserver.exe