Hi I'm using Visual studio 2010 and I can't figure out one thing. I can debug and set breakpoints in release mode as well as debug mode. so then what's the difference between the two?
+1
A:
The difference is optimizations that the compiler applies in Release mode. You can place breakpoints if you have PDB files and by default they are generated even in Release mode.
Darin Dimitrov
2010-09-30 16:46:28
A:
Newly allocated memory contains arbitrary values - whatever happened to be last sitting there. In release builds this is untouched. Debug builds in VS initialise newly allocated memory to 0xcdcdcdcd to flag is as "uninitialised".
Why would a release build fill memory with junk to make debugging easier? Release modes are just that - minimal extra overhead for actual releases.
Serkan Hekimoglu
2010-09-30 16:47:40
+1
A:
here is a more detailed answer on Scott Hanselmans Blog
But the root of the issue is that the code is compiled with more optimizations, you can still debug due to the creation of the pdb files.
Mitchel Sellers
2010-09-30 16:47:57