Skip to main content
Returns a metadata table for a function or stack level. target must be a function or number. Invalid target types raise “function or number expected”, invalid stack levels raise “Level out of range”, and unavailable levels raise “invalid level”. The returned table includes func, nups, source, short_src, currentline, what, linedefined, is_vararg, numparams, and name. sizep is included only for direct Lua function targets. debug.getinfo is an alias.

Syntax

Aliases

  • debug.getinfo

Arguments

Returns

Example

Read the metadata table for a function or stack level.