debug用release进行程序调试
- 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
Visual Studio之RelWithDebInfo模式,“被忽视”的编译模式_inter_peng的专栏-CSDN博客_relwithdebinfo
因为RelWithDebInfo模式默认是和Release模式一样,对工程进行最大性优化以提高速度。而因为我们要单独调试某一个工程,因此需要禁用它的优先,所以切换到Disabled模式,即不进行优化。
VS如何新建RelWithDebInfo模式