AcediaDocumentation

debug.getinfo

Returns metadata for a function or reachable stack level.

Fields are source, short_src, what, name, namewhat, currentline, linedefined, lastlinedefined, nups, numparams, nparams, is_vararg, isvararg and func.

An unreachable numeric level returns nil. Unavailable metadata can use a fallback label or -1.

debug.getinfo(subject: function | number): table?

Parameters

ParameterTypeDescription
subjectfunction | numberFunction or stack level.

Aliases: getinfo.

On this page