Crate mazer_dbg

Crate mazer_dbg 

Source
Expand description

A GUI-based variable inspection tool for Rust, useful for debugging without print statements.
At runtime, inspect!(...) opens a window displaying your variables with pretty formatting.

This was inspired by Suneido’s Inspect tool, which allows you to inspect variables in a GUI.

This works under the hood by forking the process and using IPC channels to communicate with a GUI server. Only supported on Unix-like systems (Linux, macOS, etc.).

This also allows you to “time travel” through your debug frames, letting you go back and forth through previous variable states. NOTE: This does not change the execution of your program, only debug’s inspect history.

Usage:
mazer_dbg::inspect!(var1, var2, ...); mazer_dbg::inspect_when!(condition, var1, var2, ...);

inspect!() will automatically initialize the debug server if it hasn’t been done yet.

The library wraps in #[cfg(debug_assertions)] so it only compiles in debug builds. No runtime cost in release builds, as all inspect!() calls are optimized out.

Macros§

inspect
inspect_when
A conditional version of inspect! that only inspects if the condition is true Does have the runtime cost of evaluating the condition, but avoids inspecting variables when not needed

Structs§

VariableDebugFrame

Functions§

ensure_init
send_to_debug_server_and_wait