debug.traceback
Lua function debug.traceback Summary Returns a string with a traceback of the stack call Prototype `s = debug.traceback (message)` Description `Returns a string with a traceback of the stack call. An optional message string is prepended to the beginning of the traceback message.
    function f ()
      function g ()
      print (debug.traceback ("traceback in g"))
      end -- g
      g ()
    end -- f

    f ()

     -->

    traceback in g
    stack traceback:
            stdin:3: in function `g'
            stdin:6: in function `f'
            stdin:1: in main chunk
            [C]: ?
` See Also ... Topics Lua base functions Lua bc (big number) functions Lua bit manipulation functions Lua coroutine functions Lua debug functions Lua io functions Lua math functions Lua os functions Lua package functions Lua PCRE regular expression functions Lua script extensions Lua string functions Lua table functions Lua utilities Scripting Lua functions debug.debug (Enters interactive debugging) debug.getfenv (Returns the environment of an object) debug.gethook (Returns the current hook settings) debug.getinfo (Returns a table with information about a function) debug.getlocal (Returns name and value of a local variable) debug.getmetatable (Returns the metatable of the given object) debug.getregistry (Returns the registry table) debug.getupvalue (Returns the name and value of an upvalue) debug.setfenv (Sets the environment of an object) debug.sethook (Sets a debug hook function) debug.setlocal (Sets the value of the local variable) debug.setmetatable (Sets the metatable for an object) debug.setupvalue (Sets an upvalue for a function) (Help topic: lua=debug.traceback) Documentation contents page