Search

Native edit-and-continue not working in VS2012 RC by OfekShilon

Closed
as Fixed Help for as Fixed

2
0
Sign in
to vote
Type: Bug
ID: 746862
Opened: 6/5/2012 11:02:24 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
In the default-generated c++ console app, linking gives -
warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
and indeed edit and continue doesn't work.
Under tools\options\debugging\edit and continue, 'enable native edit and continue' is checked. I've tried several debugger types too - they all fail.

/OPT:LBR is currently undocumented and there's no option to disable it. It certainly shouldn't be on by default, in particular in debug builds.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012 RC

What category (if any) best represents this feedback?

 

Steps to reproduce

Take a minimal c++ console app:
#include <tchar.h>
int _tmain(int argc, _TCHAR* argv[])
{
    return 0;
}

And build it. You'd see the warning above.
Then set a breakpoint on the single code line, start debugging and try changing the return value to 1.

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

As warned, you'd see the message box:
---------------------------
Microsoft Visual Studio
---------------------------
This source file has changed. It no longer matches the version of the file used to build the application being debugged.
---------------------------
OK
---------------------------

and the edit would have no effect.

Expected results

Link should succeed without warning LNK4075. Edit and continue succeed.

Locale

 
File Attachments
File Name Submitted By Submitted On File Size  
LBR.wmv 6/7/2012 678 KB
RefTest3.rar 6/7/2012 2 KB
Sign in to post a comment.
Posted by OfekShilon on 6/9/2012 at 11:10 PM
In previous versions the warning issued was 'ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification', as it should be. (if I had seen that warning, of course I wouldn't have submitted this issue).    
I'm sure other customers will get confused too - please consider fixing the warning text back to its helpful form.
Posted by Microsoft on 6/9/2012 at 9:41 AM
If you try to use the Edit and Continue feature, please add /INCREMENTAL to linker command line. Otherwise, drop /ZI option from compiler command line and instead use /Zi or /Z7, for which linker won't emit warning LNK4075.
Posted by Microsoft on 6/9/2012 at 9:35 AM
By "fixed" I meant that we have fixed the settings of the attached project to make Edit and Continue working and by doing that LNK4075 is also gone.
Posted by OfekShilon on 6/8/2012 at 9:50 PM
Thank you! I assume the 'fixed' status refers to fixing the erroneous warning text?
Posted by Microsoft on 6/8/2012 at 3:44 PM
To enable edit and continue functionality, we have to enable incremental linking. In your project it is turned off. Also after putting /incremental back to linker command line, the LNK4075 warning is gone.

To enable edit and continue, adding /INCREMENTAL to linker command line is necessary but not sufficient. We have to check the box of "Enable native Edit and Continue" in "Tools | Options | Debugging | Edit and Continue | Native-only options".
Posted by OfekShilon on 6/7/2012 at 12:00 PM
Sure - I attach both a video and the project that consistently reproduces it for me.
Posted by Microsoft on 6/6/2012 at 2:52 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a video of this issue so that we can conduct further research?

We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 6/6/2012 at 2:40 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.