VS 2022: Edit and continue isn't working.

Kipp Woodard 6 Reputation points

Since recently upgrading to VS 2022, I cannot edit when in debug/break without being prompted:

Edits were made which cannot be compiled. Changes won't be applied until the compile errors are fixed.
Refer to the Error List Window for further details.

Click Edit to make changes to the code.
Click Stop to stop the application.

This is a different prompt from what I get when I don't have the "Enable Edit and Continue and Hot Reload" option checked.

It isn't a matter of uncompilable code.

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
966 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Michael L 11 Reputation points

    I tried all of the suggestions I found on the web such as 1) cleaning solution, 2) deleting .vs folder 3) disabling native JIT

    I was not able to get Edit and Continue working until I did this:

    Exe Project Properties -> Debug -> General -> Open Debug Launch Profiles -> uncheck "Enable Native Code Debugging". I believe this option used to be under Debug options.

    This setting is stored in launchSettings.json: "nativeDebugging": false

    2 people found this answer helpful.

  2. Michael Taylor 50,916 Reputation points

    You should report this using the Report a Problem option in Visual Studio. This will allow the VS team to look at what is going on with your specific case.

    0 comments No comments

  3. Anna Xiu-MSFT 27,726 Reputation points Microsoft Vendor

    Hi @Kipp Woodard ,

    Welcome to Microsoft Q&A!

    What kind of project are you debugging? Have you tried to create a new project to verify if the situation appears in specific project?

    Please close all instances of Visual Studio and delete the .vs folder in the project folder. Then, clean the solution to try again.

    If it persists, please share us the error message in the Error List window.

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  4. David Klingenberg 1 Reputation point

    For me setting these 2 environment variables: COR_ENABLE_PROFILING and CORECLR_ENABLE_PROFILING to 0 did the trick.

    0 comments No comments