Skip to main content

Module: core/debug

This module provides helper functions for debugging AI.JSX applications.

Functions

DebugTree

DebugTree(props, «destructured»): AsyncGenerator<string, Node[], unknown>

Render a tree of JSX elements as a string, yielding each step of the rendering process.

Most devs will not need to use this directly, and should use showInspector instead.

Example

   <DebugTree>
<MyComponent />
</DebugTree>

==>
Frame 0: <DebugTree><MyComponent /></DebugTree>
Frame 1: <DebugTree>the text my component resolved to</DebugTree>

Parameters

NameType
propsObject
props.childrenNode
«destructured»RenderContext

Returns

AsyncGenerator<string, Node[], unknown>

Defined in

packages/ai-jsx/src/core/debug.tsx:155