Edit and Continue
Menu: Tools -> Options -> Debugging -> Edit and Continue
Versions: 2008,2010
Published: 11/3/2010
Code: vstipDebug0038
Did you know you can edit your code while you are debugging? You can do it with the Edit and Continue (EnC) feature. First, you can find this option under Tools -> Options -> Debugging -> Edit and Continue:
Also, there are a TON of language-specific scenarios where you can't use this feature which can be found here:
https://msdn.microsoft.com/en-us/library/bcew296c(v=VS.100).aspx
The caveats not withstanding, this is an interesting feature that allows you to edit code while you are debugging and continue execution without having to do a full recompile of the code.
Disclaimer
I would be remiss if I didn't mention that there are some people who don't think using Edit and Continue is a good idea. John Robbins, whose opinion I respect a great deal, is one of those people and he makes some compelling arguments why you may not want to use this feature all the time. You can find John's post here:
https://www.wintellect.com/CS/blogs/jrobbins/archive/2004/10/17/c-edit-and-continue-announced.aspx
Interestingly, you can find Jeff Atwood's rebuttal to John's argument here:
https://www.codinghorror.com/blog/2006/02/revisiting-edit-and-continue.html
The bottom line: Make your own informed decision about using Edit and Continue but, even if you do use it, be fully aware of the implications of changes you make using it.
Comments
- Anonymous
November 03, 2010
Except it doesn't work in most cases and is broken with linq. Thus all of the major productivity benefits it provides are useless in almost all cases now. It's slowed my productivity by 40% going to linq because of this even though linq products fewer errors than direct sql commands.