debug
This library provides a few basic functions for debugging code in BrickVerse. Unlike the debug
library found in Lua natively, this version has been heavily sandboxed. BrickVerse does, however, have debugging functionality similar to Lua’s native debugging functionality (see the DebuggerManager
class).
Returns a traceback of the current function call stack as a string. In other words, a description of the functions that have been called up to this point. The During debugging, debug.traceback answers the question “how did my code get here?” much like an error stack trace, but without stopping the execution of the script. See the example below with several function calls: c() calls b(), b() calls a(), and a() calls debug.traceback. The above code would produce an output similar to (but not guaranteed to be exactly like) the following: The format of the returned traceback is not defined and may change at any time; use only for debug diagnostics and error analytics. It’s recommended that you never parse the return value of this function for specific information, such as script names or line numbers. |
Allows programmatic inspection of the call stack.
This function differs from This function is similar to |
Allows programmatic inspection of the call stack.
This function differs from This function is similar to |
Allows programmatic inspection of the call stack.
This function differs from This function is similar to |
void debug.profileend ( ) |
Closes the top microprofiler label. |
debug.setmemorycategory ( string tag ) |
Assigns a custom tag name to the current thread’s memory category in the Developer Console. Useful for analyzing memory usage of multiple threads in the same script which would otherwise be grouped together under the same tag/name. |
debug.resetmemorycategory ( ) |
Resets the tag assigned by |
Last updated