inspect!() { /* proc-macro */ }Expand description
Captures a snapshot of any value that implements Debug and sends it
to the lupa inspector (web UI and/or TUI).
The macro evaluates the expression, takes its {:#?} debug representation,
and records it along with the source location and the expression itself as
a label. The snapshot becomes visible in the inspector’s “Snapshots” tab.
§Return value
The macro returns the original value (by reference) so it can be used
inline, similar to dbg!.
§Example
ⓘ
let user = User::new("Alice");
inspect!(user); // snapshot appears in lupa§Feature flags
When the web feature is enabled (default), the snapshot is also broadcast
over WebSocket to all connected browser clients.