pub fn add_monitor_command<F>(
cmd: &'static str,
_description: &'static str,
_function: F,
)Expand description
Adds a monitor command to the debugger. This may be called before initialization, but should not be called before memory allocations are available. See MonitorCommandFn for more details on the callback function expectations.
ยงExample
patina_debugger::add_monitor_command("my_command", "Description of my_command", |args, writer| {
// Parse the arguments from _args, which is a SplitWhitespace iterator.
let _ = write!(writer, "Executed my_command with args: {:?}", args);
});