I'm under the assumption that the compiler will strip the code inside blocks enforced with constant/final flags? This is how you can leave code in your project that isn't shipped in the final apk.
public final static boolean DEBUG = false;
if(DEBUG) {
//add messy error prone code here
//compiler will strip this out as unreachable when false
}
Read here:
http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.21