One thought on “Is there a major difference between Release and Debug modes?

  1. When you are in Debug mode the compiler does not perform any optimizations, where as in Release mode there are optimizations done. The .Net Programming compiler is very advanced piece of code and it can do some pretty tricky low-level improving of your code. This can cause some lines of your code to get left without any instructions at all, or some might get all mixed up. Also trying to do a step-by-step debugging in release mode is impossible. Some of the local variables are optimized in mysterious ways, therefore some functionality like watches often don’t work because the variable is optimized away. This is just the tip of the iceberg as there are multitudes of other optimizations that are also performed.
    One other major difference is that the default Release settings don’t bother with generating a lot of debug symbol information. That’s the .PDB file you may or may not have noticed which allows the debugger to figure out which assembly instructions correspond to which line of code.

Comments are closed.