What's your Lua Debugger?
Hey all, just trying to gauge the usage of Lua debuggers here. Feel free to vote below on ther Lua debugger you use the most. If your debugger is not there feel free to add it in the comments! Thanks
Posted May 2, 2020, 7:56 AM UTC
You can get a lot done with just
printalone, and when that's not enough,debugcan help you a lot as well :DNo need for external debuggers, really; those don't add anything other than a fancy UI that won't always be there when you need it.
My experience is that most people who tell that they don’t use debuggers have not learned how to use them effectively. To be honest, using debuggers is not so easy as it looks, and you need the right strategies to be productive (just single stepping trough hundreds of statements is just the opposite).
Of course with interpreted languages that allow introspection and no edit, compile, run cycle, the productivity gain of a debugger is lower compared to e.g. C.
There are also situations where debuggers are the wrong tool (e.g. timing critical code), but this is also part of the experience.
In the case of Lua using the standard debug library is also a form of using a debugger.
Timed code pains me. Once I had a bug that was fixed once I added in print statements because the code ran slower. It turned out I was using the program execution time rather than the system time so adding more statements made it active longer.
Yeah print gets it for me
Doesn't work well when you're working with recursion.
Why not? Most times you can just print the arguments and you will see what iteration you're in, but you can also just set a hook that pauses every the function is called.
Not that recursion, but tree visiting.
same; you can keep track of where you are with some simple helper variables. It's just a matter of creativity ;D