Syntax
getinfo(target?: function | number | integer): tableAliases
debug.getinfoArguments
| Name | Type | Description |
|---|---|---|
target? | function | number | integer | Target function, table, stack level, or object being inspected or changed. |
Returns
| Name | Type | Description |
|---|---|---|
info | table | Debug metadata table. |
Description
Returns debug metadata for a function or stack level.
Call it with 1 parameter(s): target. The argument table explains which values are required and which ones only refine the behavior.
It returns info (table). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = getinfo(1)
print(result)