VS2012 Breakpoints are not getting hit

后端 未结 24 1657
小鲜肉
小鲜肉 2020-12-13 12:44

I have a class that looks like this:

public class MyService
{
    private MyService(){}
    public static string GetStuff()
    {
        var stuffDid = new          


        
24条回答
  •  粉色の甜心
    2020-12-13 13:29

    In Unit Tests, I was not hitting breakpoints, and realized I was Running the test and not Debugging the test. At the top of the Test Explorer are the options "Run All", "Run Failed", "Run Passed", etc. When you Run a test, breakpoints are not hit. To Debug a test, in the Test Explorer right click on the test or group of tests and select Debug Selected Tests.

提交回复
热议问题