Visual Studio 2013 Edit and Continue not working

MaxiFlash picture MaxiFlash · Mar 11, 2014 · Viewed 13.3k times · Source

With VS2013 Pro I am not able to use "Edit and Continue" when debugging an MFC program. I created a new MFC project to test.

OS is Windows 7 64-bit and I'm running Visual Studio 2013 12.0.30110.00 Update1.

Under Tools->Options->Debugging->Edit and Continue I have Enable Edit and Continue checked. I have unchecked it and checked it, but whenever I modify the code while debugging I get the following message:

The source file has changed. It no longer matches the version of the file used to build the application being debugged.

Basically I haven't changed any settings except for the tab sizes and I've set the keyboard mapping scheme to VC6.

What setting am I missing to enable edit and continue?

Answer

CarlJohnson picture CarlJohnson · Apr 2, 2014

Edit and Continue is disabled for native code by default. To enable:

  1. On the Tools menu, click Options.
  2. In the Options dialog box, open the Debugging node, and select the Edit and Continue category.
  3. In the Native-only options group, select Enable native Edit and Continue

Edit: Steps to test native Edit and Continue is working:

  1. Start VS 2013
  2. Create a new MFC project:
    • FILE->New Project->MFC Application->OK.
    • Select Finish on the MFC Application Wizard.
  3. Build and start debugging:
    • BUILD->Build Solution
    • DEBUG->Start Debugging
  4. Break into the program:
    • DEBUG->Break all
  5. Make a code change:
    • Open OutputWnd.cpp and find COutputWnd::OnSize (Line 80)
    • Insert this line at the start of the function: cx = cx / 2;
  6. Continue execution:
    • DEBUG->Continue
  7. Resize the application window to see the effect of the code change on the Output pane at the bottom. Its width should be half the required size.