Issues with breakpoint consistency and Visual Studio 2019 debugging RRS feed

  • Question

  • User1270925057 posted


    I have been an ASP.Net developer for some years but only recently using Visual Studio and am trying to do some debugging on an issue.  However, whether the breakpoints are actually hit or not is inconsistent as follows:

    I haven't been setting breakpoints to stop execution but simply to use the Actions functionality to output the results of a few variables to the output window.  However, I found sometimes I would see the breakpoint messages in the output window and sometimes not.  I have googled and tried various options but whatever I try I do not get consistent results.  

    I am debugging a website project (not web application project environment) on an asp.net framework forms website.

    I ran a test to check this properly.  I ran the IIS Express (ie chrome) a dozen times with no changes to the breakpoints or code.  This is what I found in the output window:

    Output 1 (after opening solution) - saw breakpoint info
    Output 2 (re-run) - no breakpoint info
    Output 3 (re-run) - no breakpoint info
    Output 4 - saw breakpoint info 
    Outputs 5-8 continued to showed no breakpoint info
    Output 9 - no breakpoint info (this was after doing a separate website build (however I do have debugging options to build everytime anyway)
    Output 10 (after closing and opening solution) - saw breakpoint info
    Output 11 - (re-run) no breakpoint info
    Output 12 - (after closing and opening solution) - saw breakpoint info
    Output 13 - Unticked Just my code and re-opened solution - saw breakpoint info
    Output 14 - Just my code still unticked - no breakpoint info

    The results suggest:

    • The solution needs to be re-opened to be able to continue to see breakpoint info (which can't be right)
    • Unticking Just My Code makes no difference
    • Re-running the build (even though build every time is set on debug) makes no difference.

    Therefore I would much appreciate it if anyone has any suggestions as to why I only seem to see breakpoint info after re-opening the solution.

    One other thing I looked at was the option to do as the following as this MSN page (https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-debug-dotnet-framework-source?view=vs-2019 ) says:

    To debug .NET Framework source, you must:

    • Enable stepping into .NET Framework source.

    • Have access to debugging symbols for the code.

    However, I tried this and still I got the same inconsistent results.  I believe this is to look deeper into the framework code (as this automatically disables 'just my code') so I don't think it is the solution.  Also, it's not that the breakpoints are not seen at all - just sometimes!

    Any help very much appreciated.

    Karen Comber


    Saturday, May 9, 2020 6:23 PM

All replies

  • User1686398519 posted

    Hi,  karenvc2020

    First,I want to confirm with you where did you make the breakpoint, vs or chrome? If you make a breakpoint in chrome, you should check the breakpoint in chrome.

    Second,you should check if you have set a breakpoint in vs or chrome.

    Can you give a screenshot of your problem?

    Best Regards,


    Monday, May 11, 2020 11:17 AM
  • User1270925057 posted

    Hello YihuiSun

    Many thanks for responding.

    The breakpoints are in Visual Studio (I only mentioned Chrome as it the browser that IIS Express is set to run). 

    I tried to paste a screenshot into this forum question but it doesn't work - I tried it in different browsers using ctrl V and nothing gets pasted. I know the image is in the clipboard.  If you can advise me how you did your screenshot I would much appreciate it!



    Monday, May 11, 2020 1:06 PM
  • User409696431 posted

    You can't paste an image into this forum.  You link to an image, and the link must be to a public place.  Host the image somewhere and link to it.

    Monday, May 11, 2020 7:15 PM
  • User1270925057 posted

    Thank you for letting me know about the image.

    Thursday, May 14, 2020 10:19 AM
  • User379720387 posted

    From my experience debugging / breakpoints in server side code is rock solid. Thought a few time it wasn't working right, but it was always my code.

    Client side debugging is not at all predictable. Whether I set the breakpoint in Visual Studio, or in the browser doesn't seem to matter.

    I also end up restarting the browser and try again.

    Sunday, May 17, 2020 6:28 PM