按 F9 断点变灰,Debug 调试时进不去断点,提示:
The breakpoint will not currently be hit. The source code is different from original
version.大概的意思是说当前的代码与执行文件对应版本的代码不同,这就需要重
新编译代码。
解决方案:
1.rebuild 工程。
2.在工程的代码文件(.cpp 或.h)适当的位置,敲几个回车或按几个空格,然后
rebuild。
3.重启 VS2010,把 OUT 目录的东西全删了,然后 rebuild。
4. 断 点 处 右 键 点 击 , 选 择 “ Location…” 把 “ Allow the source code to be
different from the original version”复选框勾上。