Feature description
Currently, debugging Miden Rust programs is a bit difficult. The simplest way currently to inspect a variable is via the assert_eq! macro:
let mut some_variable = 5;
// some_variable is updated to 6 somewhere
assert_eq!(some_variable, 6u32);
While this works, it interrupts program execution and is not ideal for inspecting multiple variables or complex state.
It would be very useful to have a Miden Rust-specific debug macro or function, similar to println!, that can emit the value of a variable at a particular point in execution without halting the program. For example:
debug_var!(some_variable); // hypothetically prints the current value
This would make debugging compiled Miden Rust code far more straightforward and efficient.
Benefits:
- Inspect variables without breaking execution.
- Simplifies debugging of complex programs.
- Provides a familiar interface for Rust developers (println!-like).
Why is this feature needed?
This would make debugging Miden Rust programs much more straightforward.
Feature description
Currently, debugging Miden Rust programs is a bit difficult. The simplest way currently to inspect a variable is via the
assert_eq!macro:While this works, it interrupts program execution and is not ideal for inspecting multiple variables or complex state.
It would be very useful to have a Miden Rust-specific debug macro or function, similar to
println!, that can emit the value of a variable at a particular point in execution without halting the program. For example:This would make debugging compiled Miden Rust code far more straightforward and efficient.
Benefits:
Why is this feature needed?
This would make debugging Miden Rust programs much more straightforward.