OS: Windows 2003 Standard, SP1
SQL: SQL Server 2005 Standard September CTP
VS: Visual Studio 2005-RC
--------
I have created three CLR based objects, two functions and one stored procedure.
I can not debug these using a TEST SCRIPT, via Visual Studio 2005.
(Note Studio and SQL are running from the same system, via the same account. The Account is an ADMIN privledged user on the OS, and a SYSADMIN member on the database)
When I execute the following script:
DECLARE @test as BINARY(32)
SELECT @test = [test_field]
FROM TEST_TABLE
EXEC prcCLR_DecryptField @test
The first two lines debug fine via T-SQL Debugger
Then when it executes the prcCLR_DecryptField; It hangs up, and I get a (running) notation in the Window Title Bar on the top of VS2005. It doesn't go to the brakepoint for the prcCLR_DecryptField. It just hangs, and I end debugging then all of VS2005 crashed out...
CLR Debugging is enabled for the database connection. I have dropped the connection and recreated it. I CAN, right click on the prcCLR_DecryptField, and step into it, and it works... (however this get's difficult to use with BINARY values)
The exact same thing happens when I try it with my two CLRFunctions as well.
Here is the output from the output window:
This is the output up to the CLR call
Auto-attach to process '[2264] sqlservr.exe' on machine 'DCICHISQL1' succeeded.
Debugging script from project script file.
The thread 'dcichisql1\misdb [58]' (0xfe4) has exited with code 0 (0x0).
The thread 'dcichisql1\misdb [58]' (0xfe4) has exited with code 0 (0x0).
The thread 'dcichisql1\misdb [58]' (0xfe4) has exited with code 0 (0x0).
Output AFTER the CLR Call
'sqlservr.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'sqlservr.exe' (Managed): Loaded 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\SqlAccess.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'sqlservr.exe' (Managed): Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.26_x-ww_0DDE6A53\msvcm80.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'sqlservr.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'sqlservr.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'sqlservr.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'sqlservr.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Security\2.0.0.0__b03f5f7f11d50a3a\System.Security.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Auto-attach to process '[2264] sqlservr.exe' on machine 'DCICHISQL1' succeeded.
'sqlservr.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'sqlservr.exe' (Managed): Loaded 'misdb_signature_CLRObjects', Symbols loaded.
So... this is where I am at:
I can debug via RIGHT CLICK->step through
But I can't debug via a TEST Script in VS2005
I have also tried: Clean; Rebuild; Build; and Deploy... All from menu options... Same results.
Any ideas

Debugging via Test Script; HANGS..
kabuki
Alagappapillai
The issues you are seeing could be due to a known bug that we found very late in the product cycle. The bug is most prevalent on fast multi-proc AMD64 machines but doesnt reproduce every time.
After exchanging a few email messages with Earl it appears that he cant reproduce the problem at the moment which is a clue that it is in fact the same bug.
At the moment there isnt a workaround for the bug. But it will be fix in SQL Server 2005 SP1.
Regards
Richard Cook
SQL Debugging QA
CoolMax
Hi Richard,
This is a bit of old thread, but perhaps you get notified of additions.
I am having this same hanging problem. I am using SQLExpress with SP1. I have a HP notebook (the nc8430) with dual processors.
When the debug session hangs I shut down the IDE and sometimes it works again. If not I end up restarting the PC to get going again.
Maybe there is still a buggy there somewhere.
Regs,
Norman.
John Moore999
------------------
Sadly... didn't help... Still can not debug via a test script....
Do to another reason, we rebuilt the system from a fresh format.
So after Windows 2003 Enterprise was installed, then SP1 for 2003... Then SQL2005, Then Visual Studio 2005 (the latest versions of both)....
Same results... Hangs up when it gets to the CLR object...
Any other ideas... As this is a VERY important aspect of the Visual Studio / SQL Development enviornment for us.....
Next thing to try is to put both the DB and the Studio on an WinXP box to see if it is 2003 causing the problems.. :( (Can't but studio on the WinXP and leave the DB on the 2003, as it crosses domains that don't trust one another)