In MS Visual Studio, what is the difference between compiling in debug mode and compiling in release mode? Also, what merits are there to making more different possible modes to compile in?In MS Visual Studio, what is the difference between compiling in debug mode and compiling in release mode?
"Debug" mode tells the compiler that you want help debugging the code.
If you compile in Debug mode, the compiler adds extra code to help your testing. For example, it checks that your stack hasn't grown too large, and that any assert()s will go off if there is a problem.
If a problem does show up, the program will halt and the operating system will load a debugger to help you work out what the problem is.
If you release this copy to the public, then exactly the same thing will happen - very unprofessional!
So, you instead use Release mode. This will compile smaller and faster code, since the extra debug tests aren't included any more. It won't help you if your code still has a bug in it though - the program will just halt.
As well as Debug vs Release, you could compile for 32-bit vs 64-bit, or Unicode vs MBCS, or some combination of these.