【发布时间】:2011-08-22 16:39:39
【问题描述】:
我正在尝试使用 VS 宏使用 nunit-console 从 Visual Studio 调试测试,但在将调试器/IDE 附加到 nunit-console/nunit-agent 时遇到问题。我确实有宏工作,如果我只想运行测试,问题只是在附加调试器时。
我似乎遇到了某种僵局问题。当我启动宏时,它会冻结 IDE。附加后,测试在断点处暂停(我认为),但我看不到这一点,因为 IDE 已冻结。我无法单步执行等,因为宏正在锁定 IDE,并且我无法继续测试,因为它在断点处停止。有什么想法吗?
我不能使用 resharper / testdriven / extensions 等,没有第 3 方,不要问 :(,所以它是宏,类似它,或者什么都没有。
使用 Nunit 2.5.7、VS 2010、.net 4 个项目。
我目前拥有的东西
process.Start() 'run nunit-console
If attachDebugger then
For Each debugProcess As EnvDTE.Process In DTE.Debugger.LocalProcesses
' no parent process ID on process type, so have to look at name for the agent.
If debugProcess.ProcessID = process.Id Or debugProcess.Name.Contains("nunit-agent") Then
debugProcess.Attach()
End If
Next
End If
process.WaitForExit()
DTE.Debugger.DetachAll()
【问题讨论】:
标签: visual-studio-2010 debugging nunit-console visual-studio-macros