1. 程式人生 > >帶你玩轉Visual Studio——VS2010斷點進不去解決方法

帶你玩轉Visual Studio——VS2010斷點進不去解決方法

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