Files
prosperon/docs/api/modules/debug.md
John Alanbrook 83b798e365 Add Hugo website and rewrite docs to match current engine
New Hugo site in website/ with prosperon.dev theme (blue/gold/castle
aesthetic), docs sidebar navigation, and content pages. Rewrote all
doc files to align with the actual codebase: compositor+film2d
rendering, use() modules (no global prosperon object), Pit language,
script+JSON entity model. Added entities.md, front matter to all
70+ API docs, and updated API index for current module architecture.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:09:55 -06:00

1.3 KiB

title, type
title type
debug docs

debug

stack_depth() function

Return the current stack depth.

Returns: A number representing the stack depth.

build_backtrace() function

Build and return a backtrace of the current call stack.

Returns: An object representing the call stack backtrace.

closure_vars(fn) function

Return the closure variables for a given function.

fn: The function object to inspect.

Returns: An object containing the closure variables.

local_vars(depth) function

Return the local variables for a specific stack frame.

depth: The stack frame depth to inspect.

Returns: An object containing the local variables at the specified depth.

fn_info(fn) function

Return metadata about a given function.

fn: The function object to inspect.

Returns: An object with metadata about the function.

backtrace_fns() function

Return an array of functions in the current backtrace.

Returns: An array of function objects from the call stack.

dump_obj(obj) function

Return a string representation of a given object.

obj: The object to dump.

Returns: A string describing the object's contents.