Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

People also ask

How do you Debug in VS code editor?

To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and VS Code will try to run your currently active file. However, for most debugging scenarios, creating a launch configuration file is beneficial because it allows you to configure and save debugging setup details.

What is disable debug mode in VS code?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.


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

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


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

  • 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.


You need to enable Edit and Continue.


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.