VS2013让Release程序生成pdb文件 进行debug调试

转载:https://blog.csdn.net/u013600225/article/details/51427791

用VS调试Release的程序,发现无法调试。其实,并不是Release的程序不能调试,而是没有让Release的程序生成pdb文件,VS无法加载pdb文件而无法调试程序。

设置一下,让Release的程序也生成pdb文件,就好了,

http://blog.csdn.net/zengraoli/article/details/28910485
vc2012报错了:
1>c:\program files (x86)\microsoft visual studio11.0\vc\include\xutility(2176): error C4996: 'std::_Copy_impl': Function callwith parameters that may be unsafe - this call relies on the caller to checkthat the passed values are correct. To disable this warning, use-D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'CheckedIterators'
 
 
 
加入预处理器(项目属性----C/C++----预处理----预处理器定义):
_SCL_SECURE_NO_WARNINGS

无法调试按下面的再设置下:

只需设置三个部分:

项目->属性->C/C++->General->Debug Information Format->Program Database for Edit & Continue (/ZI)

                 


项目->属性->C/C++->Optimization->Optimization->Disabled(/Od)

                


项目->属性->Linker->Debugging->Generate Debug Info->Yes(/DEBUG)

                

当出现设置了上面三个选项后 依然不能挂住断点,那请在试下下面的设置:

有时Release下会出现源文件与PDB文件不匹配的问题:

菜单【Tools】->【Options】->【Debugging】->【General】去掉【Require source files to exactly match original version】选项

            


--------------------- 
作者:yhc166188 
来源:CSDN 
原文:https://blog.csdn.net/yhc166188/article/details/80695317 
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/hlday6/article/details/84644302
今日推荐