Add debug macros.
Add debug output for all entry and exit points.