PDB files for production app and the “Optimize code” flag

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?


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.

From the C# Language Reference

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.

Need Your Help

Database sharding and Rails

ruby-on-rails database activerecord sharding

What's the best way to deal with a sharded database in Rails? Should the sharding be handled at the application layer, the active record layer, the database driver layer, a proxy layer, or something

Break up long line of text into lines of fixed width in Python 2.7

python string text python-2.7 format

How would I break up a long string, at the spaces where possible, inserting hyphens if not, with an indent for all lines apart from the first line?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.