2013-07-14 123 views
1
單元測試

步驟來重現無法調試TSQL從SSDT

1.創建存儲過程下(的LocalDB)

enter image description here

2.Define體和地點制動點

enter image description here

3.更新項目(通過模式更新)

enter image description here

4.Create單元測試(在項目菜單)

enter image description here

5.Define單元測試本體

enter image description here

6.Debug單元測試

enter image description here

因此 - 沒有任何反應......斷點(從第2步開始)根本沒有開火。

輸出窗口產生下一個輸出:

*Done building target "SqlDeploy" in project "test3.sqlproj". 
Done building project "test3.sqlproj". 
Build succeeded. 
C:\Users\amorozov\Documents\Visual Studio 2012\Projects\Trash\test3\test3\bin\Debug\test3.sql : Deploy warning SQL72030: The project and target databases have different collation settings. Deployment errors might occur. 
    1 Warning(s) 
    0 Error(s) 
Time Elapsed 00:00:07.73 
Executing test script... 
1 batches, 2 ResultSets, 2 rows affected 
Validating scalarValueCondition1 
The thread '.NET SystemEvents' (0x1938) has exited with code 0 (0x0). 
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>vstest.executionengine.x86.exe</AppDomain><Exception><ExceptionType>System.AppDomainUnloadedException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Attempted to access an unloaded AppDomain.</Message><StackTrace> 
</StackTrace><ExceptionString>System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.</ExceptionString></Exception></TraceRecord> 
The thread 'In-proc Node (Default)' (0xcc8) has exited with code 0 (0x0). 
The thread '<No Name>' (0x1b54) has exited with code 0 (0x0). 
The program '[6040] vstest.executionengine.x86.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).* 

我在輸出看到的唯一奇怪的事情 - <ExceptionString>System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.</ExceptionString>

我能夠在工作和在家中重現此問題。 兩個系統一個是相同的:

  • VS2012高級版(更新3)
  • 的Windows 8 64位/ Windows Server 2012中的64位

enter image description here

有人有這個功能的工作?

我做錯了什麼?

回答

0

感謝您提出這 - 這似乎是SSDT中的一個錯誤,我們創建了一個缺陷來跟蹤這個問題。您應該仍然可以從「新建查詢」窗口調試存儲過程 - 請參閱steps listed here。但是目前看起來您在單元測試期間無法調試存儲過程。

+0

好的,我看到了...謝謝你的回覆。並歡迎來到stackoverflow :) –