I’m writing this down so I don’t have to keep searching it. Content stolen from here.
To do basic debugging in Racket, use tracing.
Add the following line to your program:
(require racket/trace)
Then add the following after function-name is defined:
(trace function-name)
Every subsequent call to function-name will come with a helpful trace.
The trace function accepts multiple arguments if needed.