为什么Visual Studio 2005在发布版中编译时会生成.pdb文件?我不会调试发布版本,那么为什么要生成它们呢?
当前回答
PDB可以为发布生成,也可以为调试生成。这是设置在(在VS2010中,但在VS2005中必须相似):
项目→属性→构建→高级→调试信息
只需将其更改为None。
其他回答
调试符号(.pdb)和XML文档(. XML)文件占总大小的很大比例,不应该成为常规部署包的一部分。 但如果需要的话,应该可以访问它们。
一种可能的方法是:在TFS构建过程的末尾,将它们移动到一个单独的工件。
PDB可以为发布生成,也可以为调试生成。这是设置在(在VS2010中,但在VS2005中必须相似):
项目→属性→构建→高级→调试信息
只需将其更改为None。
Without the .pdb files it is virtually imposible to step through the production code; you have to rely on other tools which can be costly and time consuming. I understand you can use tracing or windbg for instance but it really depends on what you want to achieve. In certain scenarios you just want to step through the remote code (no errors or exceptions) using the production data to observe particular behaviour, and this is where .pdb files come handy. Without them running the debugger on that code is impossible.
实际上,如果没有PDB文件和他们拥有的符号信息,就不可能创建一个成功的崩溃报告(内存转储文件),微软也不会完全了解导致问题的原因。
因此,拥有PDB可以改善崩溃报告。
此外,您还可以利用崩溃转储来调试软件。客户将它发送给您,然后您可以使用它来识别源代码的确切版本——Visual Studio甚至会使用崩溃转储提取正确的调试符号集(如果设置正确,还会提取源代码)。请参阅微软关于符号商店的文档。
推荐文章
- 如何为构造函数定制Visual Studio的私有字段生成快捷方式?
- 为什么Visual Studio 2015/2017/2019测试运行器没有发现我的xUnit v2测试
- AppSettings从.config文件中获取值
- 如何检查IEnumerable是否为空或空?
- 没有ListBox。SelectionMode="None",是否有其他方法禁用列表框中的选择?
- 在c#代码中设置WPF文本框的背景颜色
- Visual Studio复制项目
- 如何在iis7应用程序池中设置。net Framework 4.5版本
- 如何分裂()一个分隔字符串到一个列表<字符串>
- 如何为KnockoutJS调试模板绑定错误?
- 如何指定最小值,但没有使用范围数据注释属性的最大小数?
- 如何在PowerShell中获得本地主机名?
- 如何在构建目标之外生成gcc调试符号?
- 为什么在Java和。net中不能修改字符串?
- 'throw'和'throw new Exception()'的区别