來源於:http://www.cnblogs.com/fangyukuan/archive/2010/04/27/1721718.html
(適用VS2005/VS2008)
在當前工程點擊右鍵選擇properties,選擇 All Configurations
- 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