Visual Studio 2013编辑并继续无法正常工作 [英] Visual Studio 2013 Edit and Continue not working

查看:381
本文介绍了Visual Studio 2013编辑并继续无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VS2013 Pro,调试MFC程序时无法使用编辑并继续".我创建了一个新的MFC项目进行测试.

With VS2013 Pro I am not able to use "Edit and Continue" when debugging an MFC program. I created a new MFC project to test.

操作系统是Windows 7 64位,并且我正在运行Visual Studio 2013 12.0.30110.00 Update1.

OS is Windows 7 64-bit and I'm running Visual Studio 2013 12.0.30110.00 Update1.

Tools->Options->Debugging->Edit and Continue下,我已检查Enable Edit and Continue.我已经取消选中它并对其进行了检查,但是每当我在调试时修改代码时,都会收到以下消息:

Under Tools->Options->Debugging->Edit and Continue I have Enable Edit and Continue checked. I have unchecked it and checked it, but whenever I modify the code while debugging I get the following message:

源文件已更改.它不再与用于构建要调试的应用程序的文件的版本匹配.

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

基本上,除了选项卡大小外,我没有更改任何其他设置,并且将键盘映射方案设置为VC6.

Basically I haven't changed any settings except for the tab sizes and I've set the keyboard mapping scheme to VC6.

我缺少什么设置才能启用编辑并继续?

推荐答案

默认情况下,本机代码禁用编辑并继续"功能.要启用:

Edit and Continue is disabled for native code by default. To enable:

  1. 工具菜单上,单击选项.
  2. 选项对话框中,打开调试节点,然后选择编辑并继续类别.
  3. 仅本机选项组中,选择启用本机编辑并继续"
  1. On the Tools menu, click Options.
  2. In the Options dialog box, open the Debugging node, and select the Edit and Continue category.
  3. In the Native-only options group, select Enable native Edit and Continue

修改: 测试本地编辑并继续"的步骤有效:

Edit: Steps to test native Edit and Continue is working:

  1. 启动VS 2013
  2. 创建一个新的MFC项目:
    • 文件-> 新项目-> MFC应用程序-> 确定.
    • 在MFC应用程序向导中选择完成.
  1. Start VS 2013
  2. Create a new MFC project:
    • FILE->New Project->MFC Application->OK.
    • Select Finish on the MFC Application Wizard.
  • 已构建-> 构建解决方案
  • 调试-> 开始调试
  • BUILD->Build Solution
  • DEBUG->Start Debugging
  • 调试-> 全部破坏
  • DEBUG->Break all
  • 打开OutputWnd.cpp并找到COutputWnd :: OnSize(第80行)
  • 在函数开始处插入以下行:cx = cx / 2;
  • 调试-> 继续
  • DEBUG->Continue

这篇关于Visual Studio 2013编辑并继续无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆