4 ms·
Both suck. With a debugger, you need to set up a debugger and step through (and often, they don't work quite as well as you hope). With print debugging, you nee
by pbiggar 5y ago
Both suck. With a debugger, you need to set up a debugger and step through (and often, they don't work quite as well as you hope). With print debugging, you need to add the print statements.
In both, you can't retroactively debug already executed code.
This is one of the areas where I'm really proud of what we did in Dark. In Dark (https://darklang.com https://darklang.com), all execution is traced and you can see the value of any expression on any trace by putting your cursor in the expression. Advantages:
- no struggle to reproduce the error
- no need to set up a debugger
- no need to add print statements
When I write Dark, I can debug in seconds. When I work on the Dark implementation (F# or ReScript), I spend at least minutes on each bug because I need to do a bunch of setup to find enough information to diagnose the error.