生产应用和PDB文件"优化代码"旗 [英] PDB files for production app and the "Optimize code" flag

查看:179
本文介绍了生产应用和PDB文件"优化代码"旗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我什么时候应该包括生产版本的PDB文件?我应该使用优化代码标记,将如何影响我从异常获取信息?

When should I include PDB files for a production release? Should I use the Optimize code flag and how would that affect the information I get from an exception?

如果有一个明显的性能优势,我会想使用的优化,但如果没有我宁愿有准确的调试信息。什么是通常用于生产应用做了什么?

If there is a noticeable performance benefit I would want to use the optimizations but if not I'd rather have accurate debugging info. What is typically done for a production app?

推荐答案

当你想看到的源文件名和行号在你的踪迹,产生PDBS使用唯一的PDB选项。 。优化是从PDB一代分开的,即你可以优化的的产生,而不降低性能PDBS

When you want to see source filenames and line numbers in your stacktraces, generate PDBs using the pdb-only option. Optimization is separate from PDB generation, i.e. you can optimize and generate PDBs without a performance hit.

从的the C#语言参考

如果您使用/调试:满,要知道,没有对速度和JIT优化的代码大小和/调试代码质量影响小一些影响:满。我们建议/调试:pdbonly或没有PDB生成发布代码

If you use /debug:full, be aware that there is some impact on the speed and size of JIT optimized code and a small impact on code quality with /debug:full. We recommend /debug:pdbonly or no PDB for generating release code.

这篇关于生产应用和PDB文件"优化代码"旗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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