debug
Introspection, the error handler, the debug hook and the garbage collector.
from "debug" import ...
Functions
| collectgarbage | collectgarbage(): int | Runs the garbage collector and returns the number of reclaimed objects |
| doc | doc(subject: function|instance|class): string|null | Returns a documentation string for a function, class, or instance |
| format_call_stack_string | format_call_stack_string(): string | Returns a formatted string describing the current call stack |
| get_function_decl_string | get_function_decl_string(func: function): string|null | Returns a function declaration string |
| get_function_info_table | get_function_info_table(func: function): table|null | Returns meta information about a function as table |
| get_stack_top | get_stack_top(): int | Returns the current VM stack top index |
| getbuildinfo | getbuildinfo(): table | Returns a table describing the Quirrel build (version, sizes, GC status) |
| getlocals | getlocals([level: int, include_internal: bool]): table | Returns a table of local variables at the given stack level |
| getstackinfos | getstackinfos(level: int): table|null | Returns call stack information for the given stack level |
| resurrectunreachable | resurrectunreachable(): array|null | Resurrects unreachable objects for inspection |
| script_watchdog_kick | script_watchdog_kick() | Resets the script watchdog timer |
| set_script_watchdog_timeout_msec | set_script_watchdog_timeout_msec(timeout_msec: int): int | Sets the script watchdog timeout in milliseconds and returns the previous value |
| setdebughook | setdebughook(hook: function|null) | Installs the given function as the VM debug hook; null clears it |
| seterrorhandler | seterrorhandler(handler: function|null) | Installs the given function as the VM error handler; null clears it |
| type_mask_to_string | type_mask_to_string(mask: int): string | Convert type mask to human-readable string |