为什么我的Release目录下有一个pdb文件?
当我在 Visual Studio 2008 中构建项目的发布版本时,它会创建一个 .pdb 文件,例如,对于一个简单的 WPF 项目,它会生成一个 .exe 和 .pdb 文件。
我一直理解 .pdb 文件 用于调试,所以我希望它们位于 Debug 文件夹中,而不是 Release 文件夹中。
环顾其他 StackOverflow 问题,似乎没有 pdb 文件无论如何都可以与发布版本很好地配合。
为什么默认情况下会在 Release 文件夹中生成 .pdb 文件?如何关闭该选项?
When I build a release version of a project in Visual Studio 2008, it creates a .pdb file, e.g. for a simple WPF project it generates a .exe and .pdb file.
I've always understood .pdb files to be for debugging, so I would expect them to be in the Debug folder but not the Release folder.
And looking around at other StackOverflow questions, it doesn't seem that pdb files work well with teh Release version anyway.
Why are .pdb files generated in the Release folder by default and how can I turn that option off?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你是对的。 PDB 文件用于调试,但您可能也需要调试发布版本。当您想要调试客户问题并且拥有与该问题相关的故障转储文件时,保存已发布版本的 PDB 非常重要。
顺便说一句,生成 PDB 文件不会损害编译器优化。如果您不将其发送给客户,则不会对性能产生影响。
You are right. PDB files are for debugging but you may need to debug release builds too. Saving PDBs of released builds is very important when you want to debug a customer issue and you have the crash dump file related to that issue.
By the way, generating PDB files does not harm compiler optimizations. If you don't ship it to the customer, there will be no performance implications.
这取决于项目设置。恰好在Release版本中默认也会生成一个.pdb。它不会伤害您 - 只是不要将其运送给客户。
要跳过其创建,请转到项目设置中的“链接器”->“调试”,并将“生成调试信息”设置为“否”。
It depends on the project settings. Just happens that in Release version a .pdb is also generated by default. It will not hurt you - just don't ship it to the customer.
To skip its creation go to Linker->Debugging in project settings and set "Generate Debug Info" to "No".