Improved debug macros