1

重现步骤

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).*

我在输出中看到的唯一奇怪的东西 -<ExceptionString>System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain.</ExceptionString>

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

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

在此处输入图像描述

有人有这个功能吗?

我做错了什么?

4

1 回答 1

0

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

于 2013-07-22T20:46:59.800 回答