One thing I noticed is that they both have PDB libraries, and if I run an app that was compiled as Release on another machine along with the PDB, the other machine throws an exception outlining line numbers and file paths that are valid on the other machine. Without the PDB, the release app will only show method names in the stack trace without line numbers or file references.
Here is the gist of what I see different between the two build versions:
Debug:
- Allows you to use Debug class (Debug.WriteLine messages)
- Generates addtional information (complete symbolic debug information) to assist in debugging.
- Symbols allow you to break into code and observe heap/stack.
- Runtime behavior of application is exposed allowing you to rearrange memory / next instruction while process is broken into
- Includes #if DEBUG sections of code
- Ignores #if RELEASE sections of code
Release
- Debug methods are disabled (Trace is still available)
- Runtime behavior is not exposed
- Optimized binaries for code execution on targeted platform
- Includes #if RELEASE sections of code
- Ignores #if DEBUG sections of code
- Smaller executable file size
- Faster execution