Debug is often referred to as a debug version, which contains debugging information and does not make any optimization, which is convenient for programmer debugging. Release is called publishing, which is often optimized so that the program is optimal in code size and running speed so that users are well used. Debug and Release True Secrets lies in a set of compilation options. The following is listed below (otherwise additional, such as / fd / fo, but the difference is not important)
Debug version: / MDD / MLD or / MLD or / MLD or / MLD MTD Using Debug Runtime Library / OD Turn Optimization Switch / D "_Debug" is equivalent to #define _debug, open the compile debug code switch (mainly for the ASSERT function) / Zi creates Edit and Continue database, so if the source code is modified during the debugging process No need to recompile / GZ can help capture the memory error / GM to open the minimum reduction in heavy link switch, reduce the link time
Release version: / md / ml or / MT uses the release version of the runtime function library / O1 or / O2 optimization switch, make the program minimum or the fastest / D "ndebug" closing the debug code switch (ie, does not compile the Assert function) / GF combined repetitive string and put the string constant in read-only memory to prevent modification
In fact, Debug and Release have no essential boundaries, they are just a set of compile options, and the compiler is just a scheduled option action. In fact, we can even modify these options to get an optimized debug version or a publishing version with tracking statements.