Design your code for a Debug and a Release version.

From DAY 1 of the project do daily complete builds of BOTH versions of the system. This implies that ALL checkins to the version control system should leave the source tree in a self-consistent state for both versions of the system.

Breaking the build is a very big no-no !

Daniel