How do I enable file editing in Visual Studio's debug mode?

Visual StudioVisual Studio-2008

Visual Studio Problem Overview


Is there a way to enable file editing while debugging in Visual Studio? I have unchecked the "Require the source file to exactly match the original version" checkbox. It makes no difference. I have to stop debugging to edit files. Very annoying. I enabled Edit and Continue. Same result. I disabled Edit and Continue - Same result.

Visual Studio Solutions


Solution 1 - Visual Studio

As far as I know you can uncheck the "Edit and Continue" checkbox.

> Tools -> Options -> Debugging -> Edit and Continue > Enable Edit and Continue (uncheck)

Solution 2 - Visual Studio

Expanding on Reed's correct answer.

When in debug mode editing a file is using a feature known as Edit and Continue (commonly abbreviated ENC). This allows users to change their program as it is running in the debugger.

When ENC is enabled, users are allowed to perform a limited set of edits on their file. The next action which continues execution of the program (F10, F5, etc ...) will cause the edits to be applied to the running program. If this succeeds the execution of the program will continue with the new code applied.

The debugger does not allow edits to the file if ENC is not enabled.

There are a few reasons ENC may be disabled on your computer

  • Certain profiles do not enable ENC by default and it must be explicitly enabled

  • You may be running on a 64 bit OS and have your .Net app set to "Any CPU". ENC is not available on 64 bit (CLR limitation). You'll have to set the app back to x86 for ENC to work

Solution 3 - Visual Studio

  • UNcheck "Enable Edit and Continue" (Tools -> Options -> Debugging -> Edit and Continue > Enable Edit and Continue)
  • Build your app.
  • Run it.
  • Stop it.
  • REcheck "Enable Edit and Continue".
  • Build your app.
  • Run it.
  • Try editing the files while debugging now.

This worked for me. I believe it might be some bug or syncing issue with Visual Studio 2015.

Solution 4 - Visual Studio

You need to enable Edit and Continue.

Solution 5 - Visual Studio

From MSDN

To enable/disable Edit and Continue

  • Open debugging options page (Tools / Options / Debugging). Scroll

  • down to Edit and Continue category. To enable, select the Enable Edit

  • and Continue check box. To disable, clear the check box. Note. ...

  • Click OK.

Solution 6 - Visual Studio

usually editing a file during debugging is possible when you have hit a breakpoint (and only then).

There are some restrictions though: -your new code must compile -you cant change code in a function that contains lambda expressions

Solution 7 - Visual Studio

For me this link Disabling IntelliTrace worked.
Go to

> Tools > Options > IntelliTrace > (uncheck) Enable IntelliTrace

> Or Debug > Options > IntelliTrace > (uncheck) Enable > IntelliTrace

enter image description here

Solution 8 - Visual Studio

If you have Edit and Continue turned on and you are using C# you can only edit a file if the debugger has stopped either via a break point or you manually breaking into the App via "Break All". You still won't be able to edit some files, Ex. xaml files in a WPF app, but it should solve most problems.

Solution 9 - Visual Studio

Removing tick at below option work for me

> Tools > Option > Debugging > General > Enable Edit and Continue

enter image description here

*Note: At some fellow developers system, Adding this tick performed the trick.

Solution 10 - Visual Studio

If your source origins from a decompiled dll, note that decompilers may add an IgnoreSymbolStoreSequencePoints instruction to assemblyinfo.cs:

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]

This line must be removed in order to load the pdb-file, making edit & continue work.

Solution 11 - Visual Studio

I have tried this way and its Working for me. Go TO CSProj Or VbProj File -> Choose Asp.Net Development Server/ IIS Express ->Debuggers->Enable Edit and Continue->Save and Run.

enter image description here

Solution 12 - Visual Studio

Click Tools -> Option: and then make sure the following is selectted:

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiontom7View Question on Stackoverflow
Solution 1 - Visual StudioSeckoView Answer on Stackoverflow
Solution 2 - Visual StudioJaredParView Answer on Stackoverflow
Solution 3 - Visual StudioFrancois BothaView Answer on Stackoverflow
Solution 4 - Visual StudioReed CopseyView Answer on Stackoverflow
Solution 5 - Visual StudioDilaksha AView Answer on Stackoverflow
Solution 6 - Visual StudioJohannes RudolphView Answer on Stackoverflow
Solution 7 - Visual StudioMuhammad AshikuzzamanView Answer on Stackoverflow
Solution 8 - Visual StudioMark VicunaView Answer on Stackoverflow
Solution 9 - Visual StudioPranav LabheView Answer on Stackoverflow
Solution 10 - Visual StudioTurboView Answer on Stackoverflow
Solution 11 - Visual StudioProsun ChakrabortyView Answer on Stackoverflow
Solution 12 - Visual StudiolennoxGERView Answer on Stackoverflow