Files
cell/scripts/modules/debug.js
John Alanbrook 96ef8ccba3
Some checks failed
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Add camera and debug modules
2025-02-21 17:15:58 -06:00

43 lines
1.2 KiB
JavaScript

var debug = this
debug.stack_depth[prosperon.DOC] = `Return the current stack depth.
:return: A number representing the stack depth.
`
debug.build_backtrace[prosperon.DOC] = `Build and return a backtrace of the current call stack.
:return: An object representing the call stack backtrace.
`
debug.closure_vars[prosperon.DOC] = `Return the closure variables for a given function.
:param fn: The function object to inspect.
:return: An object containing the closure variables.
`
debug.local_vars[prosperon.DOC] = `Return the local variables for a specific stack frame.
:param depth: The stack frame depth to inspect.
:return: An object containing the local variables at the specified depth.
`
debug.fn_info[prosperon.DOC] = `Return metadata about a given function.
:param fn: The function object to inspect.
:return: An object with metadata about the function.
`
debug.backtrace_fns[prosperon.DOC] = `Return an array of functions in the current backtrace.
:return: An array of function objects from the call stack.
`
debug.dump_obj[prosperon.DOC] = `Return a string representation of a given object.
:param obj: The object to dump.
:return: A string describing the object's contents.
`
return this