Module

server.debug_runtime

Native debug runtime wiring and trace storage.

Classes

DebugTraceRecord 8
One bounded debug trace record.

One bounded debug trace record.

Attributes

Name Type Description
channel str
phase str
path str
request_id str
internal bool
owner str
ts_ms int
data dict[str, Any]
DebugTraceStore 3
Thread-safe bounded in-memory trace buffer for debug mode.

Thread-safe bounded in-memory trace buffer for debug mode.

Methods

record_sse 6
Record an SSE lifecycle event without mutating stream output.
def record_sse(self, *, phase: str, path: str, request_id: str, internal: bool, owner: str, data: dict[str, Any] | None = None) -> None
Parameters
Name Type Description
phase
path
request_id
internal
owner
data Default:None
records 1 tuple[DebugTraceRecord, …
Return a stable snapshot of buffered records.
def records(self, *, include_internal: bool = False) -> tuple[DebugTraceRecord, ...]
Parameters
Name Type Description
include_internal Default:False
Returns
tuple[DebugTraceRecord, ...]
Internal Methods 1
__init__ 1
def __init__(self, limit: int = 500) -> None
Parameters
Name Type Description
limit Default:500

Functions

build_runtime_debug_wiring 1 RuntimeDebugWiring
Build the immutable internal/debug wiring descriptor for an app.
def build_runtime_debug_wiring(config: AppConfig) -> RuntimeDebugWiring
Parameters
Name Type Description
config AppConfig
Returns
RuntimeDebugWiring
render_debug_manifest_json 1 str
Serialize debug wiring for the browser DevTools runtime.
def render_debug_manifest_json(wiring: RuntimeDebugWiring) -> str
Parameters
Name Type Description
wiring RuntimeDebugWiring
Returns
str
render_debug_traces_json 2 str
Serialize buffered debug traces.
def render_debug_traces_json(wiring: RuntimeDebugWiring, *, include_internal: bool = False) -> str
Parameters
Name Type Description
wiring RuntimeDebugWiring
include_internal bool Default:False
Returns
str