Visual C ++ 2008'Release'版本包含调试信息 [英] Visual C++ 2008 'Release' build contains debug information
问题描述
- C ++ /常规/调试信息格式设置为程序数据库。
- 链接器/调试/生成调试信息设置设置为是。
我从未注意到早期版本的Visual Studio
所以,除了生成一个较大的EXE文件外,还有什么缺点让这些设置启用?
我们已经在我们的商业版本中打开了这些设置多年了,没有明显的缺点。尽管如此,事态是巨大的。
我们已经集成了一个崩溃转储打包程序,它将转储与其他一些信息一起打包,并将其(通过用户同意)发送到公司收件箱。这有助于我们找到可能使我们永远复制并找到其他问题的问题。
尽管它稍微偏离主题,一个很好的贡献有人为您提供了一个简单的方法来将崩溃记者包括在C ++ / Windows应用程序中:
http://www.codeproject.com/KB/debug/crash_report.aspx
注意:这将是明智的,虽然,不要在您的版本中包含PDB文件。也就是说,您必须保持与您发布的版本相匹配的PDB文件,以便将来可以正确调试该问题。如果使用的PDB文件不是使用与构建exe相同的代码构建的,那么在尝试调试dmp时看到的堆栈将是错误的。
I've noticed that when generating a new C++ project using MS Visual Studio 2008, the Release build contains debugging symbols - specifically the following settings are enabled:
- The C++/General/Debug Information Format is set to Program Database.
- The Linker/Debugging/Generate Debug Info setting is set to Yes.
I have never noticed this on earlier releases of Visual Studio.
So, other than generating a larger EXE file, is there any downside to leaving these settings enabled?
We have turned on those settings in our commercial releases for years now with no apparent downside. The upsides are enormous,though.
We have integrated a crash dump packager that packages the dump along with some other information and emails it (with the user's consent) to a company inbox. This has helped us find problems that would have taken us forever to reproduce and find otherwise.
Although it's slightly off topic, here's a link to an excellent contribution someone made that gives you an easy way to include a crash reporter to a C++/Windows app: http://www.codeproject.com/KB/debug/crash_report.aspx
Note: It would be wise, though, not to include the PDB file with your release. That said, you must keep the PDB file that matches your released version so that you can correctly debug the problem in the future. If a PDB file is used that wasn't built with the same code that built the exe, the stack you see when you try to debug the dmp will be wrong.
这篇关于Visual C ++ 2008'Release'版本包含调试信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!