Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does a VS 2010 project compilation, generates pdb files, when building in Release and Debug mode?

I am building my window service c# project of VS 2010 in Release mode. My first chance to get surprised was that it's creating pdb files even in release in mode. I was not able to load the debug symbols after attaching the process for debugging.

My question is that if we have pdb files in both debug and release mode then why there is need for two compilation mode.

like image 896
Romil Kumar Jain Avatar asked May 06 '12 05:05

Romil Kumar Jain


1 Answers

My question is that if we have pdb files in both debug and release mode then why there is need for two compilation mode

There are differences other than PDB generation between debug and release. If you go into the Build properties and go into "Advanced", there are different levels of debug information to be generated - Full, PDB-only and None.

In addition, there are different levels of compile-time optimization, and the presence of different preprocessor symbols (e.g. so that each Debug.Assert will be present or absent).

Of course you can have your own varieties of build configuration too, with a variety of options.

like image 136
Jon Skeet Avatar answered Oct 17 '22 14:10

Jon Skeet