Expand description
Debug log insertion and removal for method chains.
This module provides mutations for inserting trackable debug logs into method chains, and removing them later. All inserted logs are marked with session IDs and timestamps, making it easy to:
- Insert
.inspect(|x| dbg!(x))between method calls - Wrap expressions with
dbg!() - Insert
println!statements - Remove all debug logs from a session
- Remove all ryo-inserted debug logs
§Example
ⓘ
use ryo_mutations::debugger::{DebugSession, InsertInspectMutation};
// Create a session for grouping related debug logs
let session = DebugSession::new();
// Insert inspect after a specific method
let mutation = InsertInspectMutation::new("iter", session.marker_with_desc("after iter"));
// Later, remove all logs from this session
let remove = RemoveDebugLogsMutation::by_session(session.id());Structs§
- DbgWrap
Mutation - Wrap expressions with
dbg!()macro. - Debug
Marker - A debug marker that tracks metadata about inserted debug logs.
- Debug
Session - A session for grouping related debug insertions.
- Insert
Inspect Mutation - Insert
.inspect()after a method call in a chain. - Remove
Debug Logs Mutation - Remove debug logs inserted by ryo.
Enums§
- Removal
Target - Target for removal.
Constants§
- MARKER_
PREFIX - Prefix used to identify ryo debug markers in comments.