Visual Studio “Debug Unit Test” fails to hit breakpoints

前端 未结 11 2046
天涯浪人
天涯浪人 2020-12-17 07:28

When using Visual Studio 2008 and debugging my unit tests... sometimes the debugger works fine. However very often after modifying some code then clicking \"Debug Unit Test\

11条回答
  •  天涯浪人
    2020-12-17 08:20

    One problem that I stumbled upon when trying to debug a test method was that it was private. Simply changing the method from private to public fixed my problem.

    I don't know why this is a problem, but it probably has something to do with the implementation of the [Test] attribute of NUnit.

提交回复
热议问题