Search code examples
visual-studiopdb-files

What is the difference between .pdb files generated from Release and Debug mode?


I know that Release and Debug are just different configurations and pdb is an enabler for easy debugging, but what is the difference between pdb files generated from Release and Debug mode while building project


Solution

  • There is no technical difference like file format or features used.

    But since the binary is optimized in release mode, some symbols may be missing (like local variables) or changed (like inlined methods). Thus you need one PDB matching the debug build and another PDB matching the release build.

    What you sometimes find is this: companies create public PDBs using PDBCopy. The private information (like private methods) will then be removed. This makes debugging harder but still better than nothing. You can e.g. use this if you publish an API for developers. This public/private thing can be applied to both, debug build or release build.