Enhanced stack trace library for Lua that provides detailed debugging information including local variables and function names.
StackTracePlus is a Lua library that provides enhanced stack traces for debugging purposes. It replaces the standard `debug.traceback` function with more detailed output that includes local variable values, attempts to identify function names, and provides better context for error locations. It solves the problem of uninformative stack traces that make debugging Lua applications difficult.
Lua developers working with Lua 5.1, 5.2, 5.3, LuaJIT, or OpenResty who need better debugging tools. This is particularly useful for developers maintaining complex Lua codebases where understanding error context is crucial.
Developers choose StackTracePlus because it provides significantly more debugging information than standard Lua stack traces without requiring complex setup. The ability to see local variable values and better function identification saves debugging time and makes error diagnosis more efficient.
StackTracePlus provides enhanced stack traces for Lua.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides enhanced stack traces with local variable values and smart function identification, as shown in the example output where locals like 's = string: "this is a string"' are displayed.
Works with Lua 5.1, 5.2, 5.3, LuaJIT, and OpenResty, ensuring compatibility across various Lua environments, as stated in the README.
Allows extending awareness to custom tables and functions using add_known_function and add_known_table, as demonstrated in the examples with descriptive labels.
Already recognizes common Lua libraries and functions like coroutine, print, and pcall, reducing noise in tracebacks.
For LuaJIT, Lua 5.2, and Lua 5.3, the traceback function cannot be easily replaced globally, requiring workarounds as noted in the README.
Collecting and formatting detailed stack traces, including local variables, may slow down error handling compared to standard debug.traceback.
Lacks interactive or graphical debugging features, such as step-through or breakpoints, limiting it to enhancing text-based error messages.