Lua does have its drawbacks.
And they're mostly described in the "gotcha" list: https://www.luafaq.org/gotchas.html
But as always, the KISS rule applies here.
Follow KISS and you don't need any overcomplications.
You know, I don't even use debuggers. Because there are enough logs.
And if you write code even more simply, then a couple of prints will be enough.