Skip to main content

DebugInfo

Type

Contains information about the function that is currently using the given stack frame or of a given function.

Properties

func

DebugInfo.func: (T...) → U...

The function that is currently using the stack frame/ provided function.

source

DebugInfo.source: string

The chunkName of the function that is currently using the stack frame/ provided function.

WARNING

This property only holds useful information if the function is a Luau function, else it will contain =[C].

short_src

DebugInfo.short_src: string

A shortened version of the chunkName of the function that is currently using the stack frame/ provided function.

WARNING

This property only holds useful information if the function is a Luau function, else it will contain [C].

currentline

DebugInfo.currentline: number

The current line number of the function that is currently using the stack frame/ provided function.

WARNING

This property only holds useful information if the function is a Luau function, else it will contain -1.

name

DebugInfo.name: string

The debugname of the function that is currently using the stack frame/ provided function is at.

what

DebugInfo.what: "Lua" | "C"

The debugname of the function that is currently using the stack frame/ provided function is at.

Usage

If your executor somehow messed up on islclosure or iscclosure, you can use this field to check the type of function you have.

nups

DebugInfo.nups: number

The number of upvalues used by the function that is currently using the stack frame/ provided function.

numparams

DebugInfo.numparams: number

The number of parameters used by the function that is currently using the stack frame/ provided function.

WARNING

This property only holds useful information if the function is a Luau function, else it will contain 0.

is_vararg

DebugInfo.is_vararg: boolean

If the function that is currently using the stack frame/ provided function is a vararg function.

WARNING

This property only holds useful information if the function is a Luau function, else it will contain true.

Show raw api
{
    "functions": [],
    "properties": [
        {
            "name": "func",
            "desc": "The function that is currently using the stack frame/ provided function.",
            "lua_type": "(T...) -> U...",
            "source": {
                "line": 14,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "source",
            "desc": "The chunkName of the function that is currently using the stack frame/ provided function.\n\n:::warning\nThis property only holds useful information if the function is a Luau function, else it will contain `=[C]`.\n:::",
            "lua_type": "string",
            "source": {
                "line": 25,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "short_src",
            "desc": "A shortened version of the chunkName of the function that is currently using the stack frame/ provided function.\n\n:::warning\nThis property only holds useful information if the function is a Luau function, else it will contain `[C]`.\n:::",
            "lua_type": "string",
            "source": {
                "line": 36,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "currentline",
            "desc": "The current line number of the function that is currently using the stack frame/ provided function.\n\n\n:::warning\nThis property only holds useful information if the function is a Luau function, else it will contain `-1`.\n:::",
            "lua_type": "number",
            "source": {
                "line": 48,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "name",
            "desc": "The debugname of the function that is currently using the stack frame/ provided function is at.",
            "lua_type": "string",
            "source": {
                "line": 55,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "what",
            "desc": "The debugname of the function that is currently using the stack frame/ provided function is at.\n\n:::tip Usage\nIf your executor somehow messed up on `islclosure` or `iscclosure`, you can use this field to check the type of function you have.\n:::",
            "lua_type": "\"Lua\" | \"C\"",
            "source": {
                "line": 66,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "nups",
            "desc": "The number of upvalues used by the function that is currently using the stack frame/ provided function.",
            "lua_type": "number",
            "source": {
                "line": 73,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "numparams",
            "desc": "The number of parameters used by the function that is currently using the stack frame/ provided function.\n\n:::warning\nThis property only holds useful information if the function is a Luau function, else it will contain `0`.\n:::",
            "lua_type": "number",
            "source": {
                "line": 84,
                "path": "impl/Types/DebugInfo.luau"
            }
        },
        {
            "name": "is_vararg",
            "desc": "If the function that is currently using the stack frame/ provided function is a vararg function.\n\n:::warning\nThis property only holds useful information if the function is a Luau function, else it will contain `true`.\n:::",
            "lua_type": "boolean",
            "source": {
                "line": 95,
                "path": "impl/Types/DebugInfo.luau"
            }
        }
    ],
    "types": [],
    "name": "DebugInfo",
    "desc": "Contains information about the function that is currently using the given stack frame or of a given function.",
    "tags": [
        "Type"
    ],
    "source": {
        "line": 7,
        "path": "impl/Types/DebugInfo.luau"
    }
}