Visual Studio Debugger Code Changed Cannot Continue Debugging

RRS feed

  • Remove From My Forums

 locked

Visual studio not responding in debugging mode when edit and continue RRS feed

  • Question

  • Hi,

    I used VS Professional 2019 v.16.3.1 and when I entered in debugging mode and I modify something and I pressed "Continue" or "Step Over" my IDE not responding several seconds almost 1 minute or sometimes it crashed and I need to restart it.

    Obs: I run VS in a Win10_x64 virtual machine.

All replies

  • Hi dinui,

    Thank you for posting here.

    According to your description, I notice that your issue is more related to enter break state (or stepping) slow (or crash) when edit (modify) and continue.

    Edit and continue is a time-saving feature that enables you to make changes to your source code while your program is in break mode. However, edit and continue does have restrictions on what types of edits can be applied (for example edits cannot be applied if another thread is executing that line of code). This means that when the debugger enters break state it checks to see if an edit is going to be allowed so it can provide a proper error message.

    You might need to check if your "edit" or "modify" has affections or contrary on executing the next steps. There are also some possibilities that might affect the corresponding time, you could check the suggestions below.

    > > Call stacks

    ## The debugger will provide you with a complete call stack, after finishing executing the section where you set breakpoint (or step over). Sometimes it will cost long time, because the debugger needs to "walk backwards from the current instruction pointer until it reaches the function the current thread originated in".

    ## Please try these steps and check if this could work.

    • Disable "Show Threads in Source" (from menu button) if it is enabled and close the Parallel Stacks Threads, Tasks, and GPU threads windows if they are open. (These cause the debugger to walk the call stack for every thread in the process).
    • Load symbols for all of the modules on your call stack.
    • A drastic move is to close anything that shows a call stack, to eliminate the "call stack walk" completely. Besides, close the Call Stack window, and additionally remove the Debug Location toolbar (View/Toolbars/Debug Location and uncheck it) as it also shows the current stack frame.

    > > Populating the Watch window when debugging managed code

    ## When debug, the debugger needs to execute the value of the property (actually they are functions) for retrieving the value of a property. Since most properties are simple but it will need to take a long time sometimes.

    ## You could try the following tips:

    • Clear any properties from the Watch windows, or hide the Watch windows (by closing them or bringing another window on top of them in the same docking area). The debugger only evaluates expressions in the windows when they are visible.
    • Hide the Autos and Locals window that automatically populate.
    • Alternately, disable "Enable property evaluation and other implicit function calls" under Debug -> Options.

    In addition, this document: Make Debugging Faster with Visual Studio has explained clearer and provided us with more details, I think it might help you.

    Hope all above could help you.

    Best Regards,

    Tianyu


    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.

    • Edited by Wednesday, October 2, 2019 5:20 AM
    • Proposed as answer by Tianyu Sun-MSFT Microsoft contingent staff Thursday, October 3, 2019 12:52 AM
  • Hi dinui,

    Sorry to disturb you, did your issue solved? did you have any update?

    If the reply is useful for you to solve your issue, please remember to mark it as answer, so that other members of this forum who have the similar issue could refer to this thread and get more help.

    If not, feel free to let us know and we will try our best to help you.

    Thanks for your understanding.

    Best Regards,

    Tianyu


    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.

  • Hi dinui,

    Sorry for bothering you.

    Could Tianyu's suggestion help you? If it persists, please feel free to contact us.

    >when I entered in debugging mode and I modify something

    Did you modify some debugging options when breaking? As Tianyu says, we suggest you only change your code when using "Edit and Continue" feature.

    Any feedback will be expected.

    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

  • Hi dinui,

    Did your issue still persist?  If not, l suggest you can use your project symbol file such as this picture show:

    Tools-->Options-->Debugging-->Symbols-->add this location into the Symbols and remember to check it. It only loads project-related symbols when debugging, optimizing the debugging process.

    More information about this symbol file you can refer to this.

    Besides, uncheck Enable Just My Code option.

    >>Tools-->Options-->Dedegging-->General-->uncheck it.

    Any feedback will be expected.

    Best Regards,

    Perry


    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

greenwifeatist.blogspot.com

Source: https://social.msdn.microsoft.com/Forums/en-US/b91e6a5b-0967-4b65-b9bf-54eae1d2542d/visual-studio-not-responding-in-debugging-mode-when-edit-and-continue

0 Response to "Visual Studio Debugger Code Changed Cannot Continue Debugging"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel