add_monitor_command

Function add_monitor_command 

Source
pub fn add_monitor_command(
    cmd: &'static str,
    description: &'static str,
    function: MonitorCommandFn,
)
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);
});