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

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

image

4 Comments

  1. El Diego

    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. Tester Tester

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *