Debug functions and macros need to be defined before they are used