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\
If you are using a setup method with [TestInitialize]
\ [ClassInitialize]
attribute (mstest \ nunit)? try to check if that setup code is being executed successfully.
For example:
[TestInitialize]
public void Setup()
{
throw new Exception();
}
[TestMethod]
public void SomeFooTest()
{
//The breakpoint will "Fail" to hit here.
}
In visual studio you can easily see this behavior with Test Explorer or by the CodeLens (only in professional):