If you’re unit test class in Microsoft Visual Studio 2010, contains multiple [TestMethod] functions, you can debug or run only a specific [TestMethod] by placing you’re cursor in the [TestMethod] and click “Debug Tests in Current Context


Tags: , ,

4 Comments on Debug single unit test [TestMethod] in Microsoft Visual Studio 2010

  1. El Diego says:

    Hey Roel.

    For some reason Visual Studio 2010 is not loading the debug symbols so my breakpoints are never hit.

    You have any idea what this could be?

  2. PARUS says:

    Same issue. VS 2010 do not spot at breakpoint in test method. Never have such issue with NUnit.

  3. Tester Tester says:

    Click on the controller action method you want to debug and then select Test –> Debug —> Tests in Curent Context.

    If you have a break point in your test method then it will be hit.

  4. Sheir says:

    place cursor in the test method
    add a breakpoint
    Ctrl+R, Ctrl+T

Leave a Reply