break point is not hitting while debugging

前端 未结 7 1541
梦如初夏
梦如初夏 2021-01-03 00:12

Possible exact duplicates:

Reason for VS.NET ‘current breakpoint will not be hit’ warning?
Why does Visual Studio sometimes not go t

相关标签:
7条回答
  • 2021-01-03 00:15

    That suggests the build that's running doesn't match with your code.

    Try performing a "clean", make sure that you've stopped any previous debugger sessions etc, then rebuild and retry.

    0 讨论(0)
  • 2021-01-03 00:18

    make sure there are not instances of w3wp.exe running. I had several and closing them fixed it for me.

    0 讨论(0)
  • 2021-01-03 00:19

    It worked for me. Try this.

    First try rebuilding your project by right mouse click the project > Rebuild If that doesn't work, try a clean of the project (right mouse click on the project > clean)

    If that didn't work check this:

    Right mouse click your project
    select [Properties]
    select the [Build] tab
    make sure [Define DEBUG constant] and [Define TRACE constant] are checked
    Click the [Advanced] button at the bottom of the Build tabpage
    Make sure that [Debug Info:] is set to [full]
    Click [OK] and rebuild the project ;-)
    

    Hope that works for you! (step 6 generates the .pdb files, these are the debugging symbols)

    0 讨论(0)
  • 2021-01-03 00:25

    In my i changed the connection string but in the browser it was referring to old string so i just did 'empty cache and hard reload in chrome browser' and it worked

    0 讨论(0)
  • 2021-01-03 00:28

    Have a look at these articles

    • Why would the debugger not be stopping at a breakpoint in my ASP.NET application?
    • Why does Visual Studio sometimes not go to my breakpoints?
    • Reason for VS.NET ‘current breakpoint will not be hit’ warning?
    0 讨论(0)
  • 2021-01-03 00:28

    This problem occurred to me when I had copied the project. In fact, by opening the old code file if breakPoint is inserted, you will see that it will work. So learn the correct copying method.

    0 讨论(0)
提交回复
热议问题