How to debug a macro?

Or write log messages, using something like this: