I have a SQL Server 2008 R2 CLR Database project with a table value function. The table value function runs select queries in order to preform it's logic. I want to debug this in VS 2010 so I can step through my code but for the life of me I can't figure out how to do it and I have read countless Blogs.
I have a test.sql file and I have set it as my default test script with a breakpoint in my CLR function. When I click the "Start Debugging" button from within my test script VS 2010 will go into not responding mode while it re-deploys my assembly and then after a few minutes VS 2010 will stop debugging with a message that it exited with code "0". It's like it never runs my code.
I have also tried selecting the function from the server explorer and clicking the "step into" option on the context menu but I just get an error that remote debugging is not setup on our development server. Do I need remote debugging enabled and if so how do I go about doing it the right way to get this to work. I have been at this for days and I am ready to pull my hair out. I even spent my weekend working on this. Please any help would be appreciated.