PL: Debugging MacrosFor the macro homework

This is a quick handout to help you with debugging macros.

In DrRacket

If you’re working with DrRacket, then there is a macro stepper button in the toolbar. When you click it, you’ll get a new window showing macro expansion steps. Note that Racket itself is full of macros, so you’ll generally want to click the option to hide library macros. I’m not sure that you can get it to work sanely though.

In Racket

Another option is to use the Racket console REPL. Here’s a rough sketch of how you’d do it: