debug.format_call_stack_string
Defined in module
"debug"from "debug" import format_call_stack_stringformat_call_stack_string(): string
Returns a formatted string describing the current call stack
Return value
A multi-line string: one *FUNCTION [name()] source:line line per frame above this call, followed by a LOCALS section listing the local variables visible at every one of those frames.
Example
from "debug" import format_call_stack_string
function inner() {
return format_call_stack_string()
}
println(inner())Output:
CALLSTACK
*FUNCTION [inner()] doc/examples/debug/format_call_stack_string.nut:4
*FUNCTION [__main__()] doc/examples/debug/format_call_stack_string.nut:7
LOCALS
[this] NULL
[inner] CLOSURE=FN:inner
[vargv] ARRAY=[]
[this] NULLSee also
getstackinfos | Returns call stack information for the given stack level |
get_stack_top | Returns the current VM stack top index |
| debug | module index |