none
Visual Studio 2015 Edit and Continue C++

    Question

  • Hello,

    I am trying to use the Visual Studio 2015 Edit and Continue under Visual Studio 2015 Professional with Update 1 for C++.

    My problem is that after applying the code changes, I cannot set any breakpoint as it says that : "The breakpoint will not currently be hit. The source code is different from the original version".

    My settings are the following 

    - Under properties of the project, C/C++, General, Debug Information Format is "Program Database for Edit and Continue"

    - Under properties of the project, Linker, General, Enable Incremental Linking is "Yes"

    - Under Tools, Options, Debugging, General I have the following

    Use Managed Compatibility Mode : unchecked

    Use Native Compatibility Mode : unchecked

    Enable Edit and Continue : checked

    Enable Native Edit and Continue : checked

    Apply Changes on continue (Native only) : checked

    Warn about stale code (native only) : checked

    Allow precompiling : unchecked

    Also the platform toolset is v140.

    How can I make sure that I can still set breakpoints and that they are hit after the code changes have been applied?

    Thank you,

    Benoit

    Wednesday, February 03, 2016 9:13 PM

Answers

  • Hi Bentroc,

    >>I have tried creating a simple test project with the same settings and, like you, I could successfully apply code changes and set breakpoints. 

    So I think your problem is not related to Visual Studio 2015. You said your project is highly dependent on many static and dynamic libraries, I suggest you add these libraries to the new project with the same compilation settings one by one. It can help us confirm which library causes your problem.

    Best Regards,
    Weiwei

    Friday, February 05, 2016 1:22 AM
    Moderator

All replies

  • Hi Bentroc,

    According to your settings, all of them are the same with my sample project but I can add breakpoint in my project without any message.

    Based on the message you got, please try clean your solution and then rebuild it to check whether it still has this issue. If rebuild doesn't fix it, please try delete all content in bin folder manually.

    You also can create a new project to check whether the new project has this problem too. If the new project can add breakpoint, please move the project files from the original project to the new project. If the new project also can't add, please try reset/repair your Visual Studio.

    Best Regards,
    Weiwei

    Thursday, February 04, 2016 7:05 AM
    Moderator
  • Hi Weiwei,

    Thank you for your answer. I have tried cleaning and rebuilding, then deleting the contents of the Debug folder and building again but it unfortunately did not help. Now the "Apply Code Changes" is even grayed out.

    I have tried creating a simple test project with the same settings and, like you, I could successfully apply code changes and set breakpoints. 

    My main project is highly dependent on many static and dynamic libraries, I am wondering if the compilation settings for those could affect my project?

    Best regards,

    Bentroc

    Thursday, February 04, 2016 3:19 PM
  • Hi Bentroc,

    >>I have tried creating a simple test project with the same settings and, like you, I could successfully apply code changes and set breakpoints. 

    So I think your problem is not related to Visual Studio 2015. You said your project is highly dependent on many static and dynamic libraries, I suggest you add these libraries to the new project with the same compilation settings one by one. It can help us confirm which library causes your problem.

    Best Regards,
    Weiwei

    Friday, February 05, 2016 1:22 AM
    Moderator