当在对工程的属性,如由静态工程转为DLL工程后,有时会出现工程中无法设置断点的问题,解决方式有如下:
- 检查debug下工程配置是否设置正确。
- C++>General->Debug Information Format->Program Database (/Zi)
- C++>Optimization->Optimization->Disabled (/Od)
- Linker->Debugging->Generate Debug Info->Yes (/DEBUG)
- Linker->Debugging->Generate Program Database File->$(TargetDir)$(TargetName).pdb
- 查看VS2008开发工具的配置是否正确
- Tools->Option->debugging->General 找到 Require source files to exactly match the original version 不要打勾
即:工具->选项->调试里->常规 找到 要求原文件与原始版本完全匹配 不要打勾