Collapse Sidebar


This library provides a few basic functions for debugging code in Roblox. Unlike the debug library found in Lua natively, this version has been heavily sandboxed. Roblox does, however, have debugging functionality similar to Lua’s native debugging functionality (see the DebuggerManager class).

string debug.traceback ( )

Returns a traceback of the current function call stack as a string, i.e. a description of the functions that have been called up to this point. The format of the returned traceback is not defined and may change at any time; use only for debug diagnostics and error analytics.

void debug.profilebegin ( string label )

Opens a microprofiler label.

void debug.profileend ( )

Closes the top microprofiler label.