In Windows Embedded Compact 7 besides retail and debug build you can have a checked build, what is it? Roughly speaking it’s something in the middle: DEBUG is defined (as in debug build) so ASSERT, DEBUGMSG, DEBUGCHK, etc. behave as in debug mode; on the other side, while in debug build the compiler optimizations are disabled, in checked builds the code is optimized as in retail build. If you ever have seen code that crashes when you run in retail but does not when you run in debug mode you may see why checked build can become handy: you can have more info than from a retail build without the overhead of a the debug build.
Note: in desktop Windows the retail build is typically called free build and it’s the ‘opposite’ of checked builds rather than debug ones.