views:

42

answers:

1

Hi everyone,

I've got a strange one here. I have a .Net executable that, under the hood, calls a few stored procedures. For whatever reason, one of the stored procs hangs when I'm debugging.

If I run the executable outside of visual studio things go fine, including this stored proc. It's when I'm debugging that this hangs, and it really hangs. If I stop the debugging session the IDE freezes and I have to kill it via taskmanager.

I know which stored procedure has the trouble, as well as the actual statement within it that's the problem. It's calling an update statement that doesn't stand out as particularly special. I can run the identical statement (and the stored procedure itself) from SQL management studio wtih no problem. And, as I mentioned, the exe runs just fine outside the debugger.

If I use the SQL activity monitor to see why things are hanging, the wait type says PREEMPTIVE_DEBUG. I'm not sure if that's helpful but if you need more info I'll try to get it to you.

I've rebooted my machine (the SQL Server in question is on this box as well) and that didn't do anything, nor did rebuilding the executable. I'm scratching my head on this one and if you have any ideas what to check on next, I'm be happy to listen. Thanks!

+1  A: 

Possibly VS is trying to start SQL server's own debugging features and failing (assuming your not already successfully using it).

You could try disabling T-SQL debugging in your solution (opposite of step 4 here)

Alex K.
Thanks for the tip. SQL debugging certainly appears to be a good part of the culprit-- when I disable T-SQL debugging the stored proc in question goes through....quite slowly, but much faster than with TSQL debugging turned on.This didn't use to happen. Is there a culprit or two I can look into further, to get an idea on what's going on? I'd like to get TSQL debugging back into the mix.
larryq
Alex K.