BT

Taking Advantage of Edit and Continue with C++ and VS2015

| by Jeff Martin Follow 16 Followers on Aug 04, 2015. Estimated reading time: 2 minutes |

The long-requested ability to edit & continue (EnC) while working with 32-bit and 64-bit C++ code has been implemented by Microsoft and is enabled by default in VS2015.  VS2013 supported a rudimentary form of EnC for 32-bit code, but enabling it meant that all of the latest features were unavailable.  EnC allows developers to make changes to their code while running their program in the debugger, and then see the results of those changes when execution resumes without requiring a recompile.

Now in VS2015, EnC can be used without losing access to other features like the Diagnostic Tools window or the enhanced call stack for debugging asynchronous code.  Even better is the expansion of edit and continue for use with 64-bit code which is a new ability with VS2015.

One thing to keep in mind is that EnC is enabled by default in new projects created from a fresh install of VS2015RTM.  When that is not the case, situations can arise where the ability to use EnC is not available.  Microsoft’s Andrew B. Hall has provided some details on the configuration changes that may be needed.  According to Hall, the three steps that should be taken are:

  • The Debug Information Format needs to be set to “Program Database for Edit and Continue (/ZI)”
  • Enable Incremental Linking needs to be set to “Yes (/INCREMENTAL)”
  • Enable Native Edit and Continue needs to be enabled under Debug -> Options

The first two apply to the project’s settings and the third is under Debug | Options.  (Hall also provides screenshots to illustrate the various locations of these settings.)

Unfortunately there remain some limitations where EnC will not work as expected.  The following impact users of VS2015RTM but Hall says they will be addressed in a future update to VS2015.  First is that binaries compiled for Windows Store do not support EnC.  Similarly, binaries compiled with /DEBUG:FASTLINK are also not supported.  This same limitation applies to binaries compiled with optimizations enabled.

When editing files through EnC, VS2015 currently supports a finite number of edits before an error message will appear indicating there is no more reserved space available.  This reserved space is currently a fixed amount, but the team plans to make this configurable so that is more developer-friendly.

To take advantage of EnC with 64-bit code, the v140 toolset must be used.  Similarly to use EnC with 32-bit code, the v120 toolset must be targeted.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT