按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”復選框勾上。