当在对工程的属性,如由静态工程转为DLL工程后,有时会出现工程中无法设置断点的问题,解决方式有如下:

  • 检查debug下工程配置是否设置正确。
  1. C++>General->Debug Information Format->Program Database (/Zi)
  2. C++>Optimization->Optimization->Disabled (/Od)
  3. Linker->Debugging->Generate Debug Info->Yes (/DEBUG)
  4. Linker->Debugging->Generate Program Database File->$(TargetDir)$(TargetName).pdb
  • 查看VS2008开发工具的配置是否正确
  1. Tools->Option->debugging->General  找到 Require source files to exactly match the original version 不要打勾
    即:工具->选项->调试里->常规 找到  要求原文件与原始版本完全匹配 不要打勾
posted on 2012-10-31 13:54  cqfuture  阅读(263)  评论(0编辑  收藏  举报