add debug macro to control some code.