【问题标题】:Edit and Continue doesn't work (C++, Visual Studio Community 2015)编辑并继续不起作用(C++,Visual Studio 社区 2015)
【发布时间】:2016-06-05 00:59:37
【问题描述】:

Visual Studio 2015 在我中断、更改代码然后继续时从不应用我的代码更改。

它在输出窗口中给了我这个消息:

-------- Edit and Continue build started --------

--------------------- Done ----------------------

Edit and Continue : Successfully applied code changes.

它在说谎;它没有应用任何东西。如果再次在该文件中设置断点,它会告诉我:

The breakpoint will not currently be hit. The source code is different from the original version.

我找不到任何不正确的编译器标志,并且在选项中启用了编辑并继续:

我在 VS 2005 和 2010 中经常使用“编辑并继续”,并且效果很好。 (嗯,它至少有超过 0% 的时间有效。)2015 年发生了什么?

【问题讨论】:

  • 您可以尝试取消选中“允许预编译(仅限本机)”并确保选中“要求源文件与原始版本完全匹配”吗?
  • @Ramkumar "要求源文件完全匹配..." 被选中。我尝试取消选中“允许预编译(仅限本机)”,但没有帮助。
  • 我明白了。这是特定于您的项目还是即使使用 hello world Win32 控制台应用程序也会发生?另外,如果您还没有安装 Update 3,可以尝试安装吗?
  • @Ramkumar 更新 3 似乎已修复它。
  • 太棒了,很高兴解决了。

标签: c++ debugging visual-studio-2015 edit-and-continue


【解决方案1】:

安装更新 3 后它现在可以工作了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-03
    • 1970-01-01
    • 1970-01-01
    • 2017-02-15
    • 2017-03-27
    相关资源
    最近更新 更多