level names a real frame on the thread. Also registered as
debug.isvalidlevel.
Every function on this page is reachable both as
debug.<name> and as a
plain global of the same name, so debug.getupvalues(f) and getupvalues(f)
are the same call.Parameters
number
required
The level to test. Must be
0 or greater.thread
The thread to check. Defaults to the current one.
Returns
boolean
true when a frame exists at that level.Behavior
- Negative levels are always
false, they are not treated as offsets from the top.
Example
Errors
Related
getcallstack: walk the frames directly.