Break then edit code

J Trahair

Well-known member
Joined
May 14, 2008
Messages
175
Location
Spain
Programming Experience
10+
(The previous post with a similar subject does not answer my query.)

I have a number of projects which I began in VS2005. All were able to the edited while in break mode. One by one I upgraded them to VS2010. Now some can be edited in break mode, others can't. I have checked the Debug Options and Settings, and compared one with another. They are all identical.

Is there another setting I have missed somewhere?
 
Now some can be edited in break mode, others can't.
Does that mean you get some kind of feedback from IDE saying they can't? For example a dialog saying something about "changes are not allowed in the following cases" ?
Edit and Continue is a setting of the IDE, not a project setting - though there is a specific project setting that will prevent E&C, resulting in mentioned informative dialog from VS 2010. These and for example 64bit issues is also described in this article: Edit and Continue (Visual Basic)
 
Yes, I get a message box with 4 reasons why it won't happen.

'Changes are not allowed in the following cases:
When the debugger has been attached to an already running process
The code being debugged was optimised at build or run time
The assembly being debugged is loaded as domain neutral
The assembly being debugged was loaded through reflection.'

However, all my projects are basically small database apps running SQL Server, SQLIte or MS Access - nothing fancy or difficult!
 
Yes, I get a message box with 4 reasons why it won't happen.
Hurray.
Edit and Continue is not supported for optimized code
A hint, this either means you are debugging a release build, or have for some odd reason checked "enable optimizations" in advanced compile options for a debug build.
 
Back
Top