Aliases
getupvalue
Arguments
function | number
required
The function to inspect, or a positive stack level identifying a caller.
number
required
A 1-based slot index.
Returns
any
The captured value at the selected upvalue index.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns one captured upvalue by 1-based index.
debug.getupvalue(target: function | number, index: number): any
getupvaluelocal captured = {value = 1}
local function sample() return captured.value end
print(debug.getupvalue(sample, 1))
