1

I have an assembly that gets built and deployed to my SQL server. I am using VS 2008 Pro (client constraint) and .NET 3.5. I need to trace through the code to figure out what's going on, but when I run the sproc that starts the process by using .NET Remote Debugger, half the time it misses the breakpoints and then gets stuck. I then get a "Debugger cannot detach from the process".

Is there a better way to debug assemblies? Why does it hang?

Jens Björnhager
  • 5,632
  • 3
  • 27
  • 47
cdub
  • 24,555
  • 57
  • 174
  • 303
  • What do you mean by it being deployed to your SQL server? Do you mean SQL\CLR functions? Or something else? – Oded Mar 29 '12 at 18:14
  • It builds my DLL and then remotes it onto my SQL Server in the Programmability > Assemblies section where I usually deploy it manually. We are stuck on this. – cdub Mar 29 '12 at 18:25

1 Answers1

1

Taken from How to stop debugging (or detach process) without stopping the process?

It Seems like you cannot detach a debugger form a process if you are debugging in mixed mode. Make sure you are debugging either in native or managed mode while attaching to the process. Reference: https://connect.microsoft.com/VisualStudio/feedback/details/109903/detach-from-process-is-not-possible

In addition you have to make sure that the DLL on your remote computer identical to the one on your VisualStudio, I always performing a build and then copy the file to the server.

Try to write simple application and remote debug it, then you can know if the remote debugger failed or this is something in your software.

Community
  • 1
  • 1
Dor Cohen
  • 16,769
  • 23
  • 93
  • 161