c++ - 调试器忽略已编辑的文件

标签 c++ edit visual-studio-2015

为什么“编辑并继续”功能在 VS2015 中不起作用? 调试器将忽略编辑,继续执行时您将看到一条错误消息,我得到以下信息

“The source file has changed. It no longer matches the version of the file used to build the application being debugged.”

最佳答案

您必须将调试信息格式设置为“Program Database for Edit and Continue (/ZI)”。如果此选项设置不正确,调试器将忽略编辑,就像修改禁用编辑和继续的文件一样。

如果您在未使用此选项编译的二进制文件中进行编辑,调试器将忽略该编辑,当您继续执行时您将看到一条错误消息“源文件已更改。它不再与用于构建被调试应用程序的文件版本匹配。”

Open the Property Pages of the project.

Under Configuration Properties -> C/C++ -> set the Debug Information Format to “Program Database for Edit and Continue (/ZI)”

Edit & Continue 仅在 VS2015 中引入,因此此选项在早期版本中不可用。

关于c++ - 调试器忽略已编辑的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31637496/

相关文章:

linux - 具有自动更新功能的 Linux 十六进制编辑器

azure - Visual Studio Online - 开发运营

C++ 不包括来自先前 header 的包含

visual-studio - Visual Studio 2015 社区 Xamarin 跨平台模板缺失

c++ - C++ 中的文件处理 : updating a line

c++ - 使用元编程和可变参数模板填充静态模板化数组

php - 了解Mysql 'on duplicate key'

c# - 如何使用 C# 编辑二进制文件的十六进制值

c++ - Switch 语句输出错误的成本值

Android AIML 机器人?