Aliases
getupvalues
Arguments
function | number
required
The function to inspect, or a positive stack level identifying a caller.
Returns
{any}
A 1-based table of captured values. Nil slots may leave holes.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns a 1-based table of upvalue values.
debug.getupvalues(target: function | number): {any}
getupvalueslocal captured = {value = 1}
local function sample() return captured.value end
for index, value in pairs(debug.getupvalues(sample)) do print(index, value) end
