1. 程式人生 > >VS2008 如何將Release版本設置可以調試的DEBUG版本

VS2008 如何將Release版本設置可以調試的DEBUG版本

deb disabled disable 版本 option 文件 data .net source

VS2008 如何將Release版本設置可以調試的DEBUG版本

只需設置三個部分:

項目->屬性->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】選項

技術分享

VS2008 如何將Release版本設置可以調試的DEBUG版本