Racket has an AMAZING debug instrumentation & tracing library, which, unfortunately, most people don't know about:
First, there's Medic:
Source: https://github.com/lixiangqi/medic
Docs: https://docs.racket-lang.org/medic/index.html
Demos: https://www.youtube.com/playlist?list=PL_U7i0VKF_mh7Vh3o2Yyt...
Paper: https://www.cs.utah.edu/plt/publications/fpw15-lf.pdf
Li, Xiangqi; Flatt, Matthew - Medic: Metaprogramming and Trace-Oriented Debugging (2015)
Building on top of Medic, but unfortunately still not packaged (unlike Medic), Li & Flatt developed (the somewhat ill-named, due to that name overlapping with something from the cryptocurrency crowd) 'Ripple', which makes debugging Domain specific languages a lot slicker:
http://www.cs.utah.edu/plt/publications/sle17-lf.pdf
Li, Xiangqi; Flatt, Matthew - Debugging with domain-specific events via macros (2017)
There's a YouTube demo here:
https://www.youtube.com/playlist?list=PL_U7i0VKF_mjF_SMiPbz-...
The published version of the above paper sits behind an ACM paywall, however, the download of the 'artifact' is open/free…:
https://dx.doi.org/10.1145/3136014.3136019
…and currently unfortunately represents the only way one can acquire the Ripple source code - and the artifact consists of a 2.4GB VM! :| (I understand why, and I consider it good scientific praxis - but I'd still appreciate a public repository in addition.)
Direct link to the artifact, for the impatient:
https://dl.acm.org/ft_gateway.cfm?id=3136019&type=zip&path=%...
Note that the artifact actually contains two very slightly different versions of the Ripple source code, a diff of which I posted over here on Github:
https://github.com/vygr/ChrysaLisp/issues/5#issuecomment-424...
(it's a two line difference in main.rkt)
If you do any of the in Racket, I can most highly recommend giving Medic (and Ripple, if you need it.) a try!