Skip to main content

别名

  • debug.getstack

参数

number
必填
Stack level number converted to an integer. Must be in range 0 <= level < current call stack depth.
number
Optional one-based stack slot index. It is used only when the second argument is a number.

返回值

table | any
A one-based table of stack slot values when index is omitted or not numeric, or the single stack slot value when index is numeric.

示例

Read stack slot values from a Lua stack frame.