If visual studio 2010 shows the above issue, then go to project properties & try following steps:
- Ensure Linker -> Debugging -> Generate program database file properties is set
- Ensure Linker -> Debugging -> Generate debug info is set
- C/C++ -> General -> Debug information is set to Program Database for edit and continue (/ZI)