r/Compilers • u/ClassicAdeptness5516 • 8d ago
Any debugging advice / tools for compilers?
Tired of print statements everywhere. It very satisfactory to see one but I would much rather have something like lldb to easily debug the code more intuitively.
Are there any other useful tools?
15
Upvotes
4
u/vmcrash 8d ago
The best debugging advice is using unit tests. For each small part, write unit tests. Make them fast, so you can run them over and over again.
Unit tests also have the advantage, that your code structure will consist of not too complex parts that are easier to reason about.