elipl/debug.md
2025-06-19 18:42:34 +02:00

9 lines
531 B
Markdown

i have a compiler Im writing in elixir. I need to trace execution of logic to pinpoint bugs.
I have many tests I want to debug individually but I can run only the full test suite.
I want to create a couple of macros/functions that'd enable me to debug my code.
the scenario I imagine:
before the test I want to debug I write `Tdd.Debug.enable`
And after the test line I add `Tdd.Debug.print_and_disable`.
The last line prints a tree of called functions, their arguments and return values.
We can modify compiler functions.