为什么我的Release目录中有一个pdb文件? [英] Why is there a pdb file in my Release directory?

查看:608
本文介绍了为什么我的Release目录中有一个pdb文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在Visual Studio 2008中构建项目的版本版本时,它将创建一个.pdb文件,例如对于一个简单的WPF项目,它生成一个.exe和.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.

我一直都明白 .pdb文件用于调试,所以我希望他们在调试文件夹中,但不是发布文件夹。

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.

查看其他StackOverflow问题,似乎没有 pdb文件与teh发布版本一起工作

And looking around at other StackOverflow questions, it doesn't seem that pdb files work well with teh Release version anyway.

为什么默认情况下在Release文件夹中生成.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.

顺便说一下,生成PDB文件不会影响编译器优化。如果您不将其发送给客户,则不会对性能产生影响。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆