none
VS 2017 hangs app after continuing from a breakpoint RRS feed

  • Question

  • When I am stopped at a breakpoint for a time examining data, etc. and then hit F5 to continue, sometimes the debugger hangs the application and I have to restart app debugging session. This has been a problem for quite awhile now, actually through multiple versions and updates.
    Wednesday, July 1, 2020 1:53 PM

All replies

  • Does it make any difference how long you're paused at the breakpoint?

    If it does, that might imply that its a quirk of your application - something has timed out and left you in a hung state?

    Can you break into the application with the debugger after you've continued (and hung) and possibly identify where it's hanging?

    Can you reproduce the problem with a simple console project?

    Wednesday, July 1, 2020 2:46 PM
  • Hi alverson,

    Does the application need to start a background process at runtime? As David suggests, I'm afraid that the debugger hang is caused by some kind of process not running.

    And you could create a new project, then check if debugger could work with clean project.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, July 2, 2020 1:56 AM
  • It actually seems to make a difference how long I'm sitting at the breakpoint, the longer the worse the problem seems to be.

    I'll try breaking into the app after the debugger appears to hang, but it never hangs the same way twice and the app doesn't hang when it's not running in the debugger.

    I'll try and reproduce with a console project once I can free up a few cycles.

    Thursday, July 2, 2020 8:09 PM
  • That would make sense if it happened at the same place with the same consistency every time but it doesn't. It's actually very annoying and increases by debugging time significantly.

    Additionally, there are times when I lose the ability to see local variables in the debug window. I have to step into another function that passes in the variable in question and the local variables return.

    These are significant bugs in the VS debugger that I've been dealing with for quite awhile.

    Thursday, July 2, 2020 8:11 PM
  • Additionally, there are times when I lose the ability to see local variables in the debug window. I have to step into another function that passes in the variable in question and the local variables return.

    Are you debugging a release (optimized) build?
    Thursday, July 2, 2020 8:23 PM
  • No...debug mode. It's literally on a random step over action and everything disappears and I can step into another function and things reappear which is my way of getting around it sometimes but that doesn't always work because that only shows the new locals passed into the new function. I've googled it for actually years but no answers to what is going on. There is definitely no logical explanation for it.

    These are the two major problems I'm having with the VS debugger. The first problem I described and losing debug variable window data.


    • Edited by alverson Thursday, July 2, 2020 9:04 PM
    Thursday, July 2, 2020 8:53 PM
  • No...debug mode.

    And you've not inadvertently set the Debug configuration to have an optimized compile option?

    Can you reproduce it in a minimal project?

    Thursday, July 2, 2020 10:41 PM
  • I'll do that when I get a few cycles. Thanks.
    • Edited by alverson Friday, July 3, 2020 1:26 PM
    Friday, July 3, 2020 1:25 PM
  • # Steps to reproduce

    Have a C# project (any kind)
    Set a breakpoint
    Start debugging and hit the breakpoint
    Click Continue or Step Over
    # Expected

    The code resumes execution.

    # Actual

    The debugged application does not resume
    The Diagnostic Tools still respond to mouse-overs, but no longer does any updates.
    The Continue mouse tooltip remains in half-faded-out state.
    Visual Studio does not respond to any input, including shutdown requests.
    The only remaining option is to shut Visual Studio down via the Task Manager.
    Friday, July 3, 2020 2:32 PM
  • Thanks for your example Max-44. Good to see (or not good to see depending on your perspective) that somebody else is frustrated with this erroneous behavior that's been around for along time.

    I'll definitely try to repeat my case, but very similar, in a more cutdown example to contribute to the conversation.

    These behaviors add significant time to the debugging cycle because you have to shut everything down and get back to your original position which depending on your application, and the profile of your data/user input, can take a lot of effort.

    I've learned to work around it, but I shouldn't have to.

    I've seen very similar complaints all over the net, but nothing exactly like mine, along with a meaningful solution.

    Friday, July 3, 2020 2:39 PM
  • I do this many times each day and don't have a problem - albeit I've been using VS 2019 preview builds for ages.

    Have you tried VS 2019 to see if it resolves this issue for you?

    Friday, July 3, 2020 3:56 PM
  • I can try that but unfortunately my application uses several 3rd party products that don't always upgrade VS support in a timely manner, so that might be problematic.

    I do this many times a day as you do, and this type of of behavior is happening I would venture to guess at least 20% of the time and at the most inopportune time that results in a few choice words coming out of my mouth :)

    • Edited by alverson Friday, July 3, 2020 6:04 PM
    Friday, July 3, 2020 5:10 PM
  • Hi alverson,

    It may be caused by a large number of cached parameters. You could try to clear user data through running 'devenv.exe /resetuserdata' in developer command tool. This command will clear user data you have, please refer more details here.

    If this issue isn't solved, maybe you need to repair your visual studio.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, July 6, 2020 10:24 AM