Error stack

Don’t know if it’s feasible but a suggestion that would help debugging a lot: printing out the whole error stack when an error happens.

Good point, that would be useful.

I’m looking at this code as a basis: (also It looks possible – we really need to improve runtime error reporting.

Yes. Yes. Yes please!

It does seem to incur a performance penalty. So if and when it comes in it will probably be a toggle - debug.enableStackTrace() or something.

If and when it comes that sounds totally reasonable! :slight_smile:

Something to keep in mind: because Lua has tail-call elimination, recursive tail calls don’t grow the stack, but when a traceback is captured they could use up a lot of memory.

Lets say someone accidently on purpose caused an array, table, whatever really… and got an overflow. Codea kills it from running at that line. Is there a way to prevent stop on errors/faults? Is the stacktrace what you are refering to? I am a littlle confused as to just how much data you would get returned if the stacks dumped like that…