Visual Studio 2013编辑并继续无法正常工作 [英] Visual Studio 2013 Edit and Continue not working
问题描述
使用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:
- 在工具菜单上,单击选项.
- 在选项对话框中,打开调试节点,然后选择编辑并继续类别.
- 在仅本机选项组中,选择启用本机编辑并继续"
- On the Tools menu, click Options.
- In the Options dialog box, open the Debugging node, and select the Edit and Continue category.
- In the Native-only options group, select Enable native Edit and Continue
修改: 测试本地编辑并继续"的步骤有效:
Edit: Steps to test native Edit and Continue is working:
- 启动VS 2013
- 创建一个新的MFC项目:
- 文件-> 新项目-> MFC应用程序-> 确定.
- 在MFC应用程序向导中选择完成.
- Start VS 2013
- 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屋!