Convert code to use the DEBUG macro so that debug code can simply be