Visual Studio - Disable PDB generation in release mode
by Geoff on Oct.18, 2011, under c#, Coding
Simple as the title reads, this is often overlooked.
PDB files contain the following:
- Public, private, and static function addresses
- Global variable names and addresses
- Parameter and local variable names and offsets where to find them on the stack
- Type data consisting of class, structure, and data definitions
- Frame Pointer Omission (FPO) data, which is the key to native stack walking on x86
- Source file names and their lines
If you are working collaboratively with your client, this data is very useful. If you aren't, this could give someone the keys to the castle when you do not obfuscate your code.
In Visual Studio 2005, Project Properties > Compile Tab > Advanced Compile Options > Goto Generate Debug Info (dropdown list) and select None
In Visual Studio 2008, Project Properties > Build Tab > Advanced > Output - Debug Info > none
Keep Coding!

