Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 无法从SSDT中的单元测试调试TSQL_Sql Server_Unit Testing_Debugging_Sql Server 2012_Sql Server Data Tools - Fatal编程技术网

Sql server 无法从SSDT中的单元测试调试TSQL

Sql server 无法从SSDT中的单元测试调试TSQL,sql-server,unit-testing,debugging,sql-server-2012,sql-server-data-tools,Sql Server,Unit Testing,Debugging,Sql Server 2012,Sql Server Data Tools,复制步骤 1.在localdb下创建存储过程 2.定义车身并放置制动点 3.通过模式更新更新对项目的更改 4.在项目菜单中创建单元测试 5.定义单元测试体 6.调试单元测试 结果-什么也没发生。。。步骤2中的断点根本没有触发 输出窗口生成下一个输出: *Done building target "SqlDeploy" in project "test3.sqlproj". Done building project "test3.sqlproj". Build succeeded. C:\Use

复制步骤

1.在localdb下创建存储过程

2.定义车身并放置制动点

3.通过模式更新更新对项目的更改

4.在项目菜单中创建单元测试

5.定义单元测试体

6.调试单元测试

结果-什么也没发生。。。步骤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).*
我在output-System.AppDomainUnloadexception中看到的唯一奇怪的事情是:试图访问卸载的AppDomain

我能够在工作和家庭中重现这种行为。 两个系统a相同:

VS2012高级更新3 Windows 8 64位/Windows Server 2012 64位 有人使用了这个功能吗


我做错了什么?

感谢您提出这个问题-这似乎是SSDT中的一个错误,我们已经创建了一个缺陷来跟踪这个问题。您应该仍然能够从新的查询窗口调试存储过程-请参阅。然而,目前看来您无法在单元测试期间调试到存储过程中

好的,我明白了。。。谢谢你的回复。欢迎来到stackoverflow: