In this example, example.lua is the following file:
local function a() error("example error") --# line 2 end local function b() a() --# line 6 end local function c() b() --# line 10 end c() --# line 13
It's really easy to use trace - just download with pastebin get CYQp63kb trace, and then run any command preceded by trace (see example). When/if the program crashes, a stacktrace will be generated automatically. This is incredibly useful for debugging large projects as it allows you to see exactly what caused the error.
If you're curious as to how it works you're welcome to read the code, but as I said earlier, it's pretty hacky.
Edited by apemanzilla, 01 November 2016 - 02:01 PM.