开发者

NUnit 2.5.7 Breakpoint still not hit (VS2010) even after attaching to the Agent

开发者 https://www.devze.com 2023-01-12 13:02 出处:网络
I am having a problem hitting the break point in debugging under VS2010 under NUnit recent recommended release 2.5.7

I am having a problem hitting the break point in debugging under VS2010 under NUnit recent recommended release 2.5.7 I have tried various ways as recommended by responses on Stack Overflow:

  1. Attach to NUnit-agent.exe
  2. Run time is correctly selected to 4.0
  3. A开发者_JAVA百科ttaching to Nunit.exe which does not even debug symbols

When attaching to the nunit-agent.exe, the symbols seem to load; however the test completes w/o hitting the breakpoint..

Anyone seen this problem??


Make sure you're using the right framework version. .Net 4 is too high, so try using .Net 3.5

Also, don't bother with the hassle of attaching to a process. That gets old very quickly. Instead, go to the properties for your unit test project, and and the Debug tab, set "Start external program:" to point to nunit.exe, and add the output dll name in the "Command line arguments" text box (eg UnitTests.dll)


Attach to nunit-agent.exe, not just nunit.exe. I don't know why but it will cause breakpoints to work

0

精彩评论

暂无评论...
验证码 换一张
取 消