question

KippWoodard-3753 avatar image
0 Votes"
KippWoodard-3753 asked MichaelLudlum-4298 answered

VS 2022: Edit and continue isn't working.

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.

vs-debugging
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cooldadtx avatar image
0 Votes"
cooldadtx answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnnaXiu-MSFT avatar image
0 Votes"
AnnaXiu-MSFT answered AnnaXiu-MSFT commented

Hi @KippWoodard-3753 ,

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.

Sincerely,
Anna


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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am working on a WinForms/C# solution with 30 projects.

I closed VS, deleted the .vs folder in the solution folder, cleaned the solution, but I still can't edit in debug (All I've done is comment out a line). When I do I get this message.

190611-image.png


0 Votes 0 ·
image.png (32.2 KiB)

Can you try clicking on the “Edit” and check if there is a message “Updating an active statement requires restarting the application”?
Then, restart your application, does it work?

0 Votes 0 ·

When I click edit there is no such message (as a prompt or in the output window). Restarting the application always works.

0 Votes 0 ·
Show more comments
MichaelLudlum-4298 avatar image
0 Votes"
MichaelLudlum-4298 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.