[2024-06-24T07:19:50Z DEBUG mozak_cli::runner] Read 23332 of ELF data.
[2024-06-24T07:19:50Z DEBUG mozak_runner::ecall] VM TRACE LOG: Debugging variables inside mozakvm is simple with trace!
[2024-06-24T07:19:50Z DEBUG mozak_runner::ecall] VM TRACE LOG: Simply write the debug code, and use trace in this scope.
[2024-06-24T07:19:50Z DEBUG mozak_runner::ecall] VM TRACE LOG: The code in this scope will be ignored when trace feature is off.
[2024-06-24T07:19:50Z DEBUG mozak_runner::ecall] VM TRACE LOG: Lets deserialize the bytes
[2024-06-24T07:19:50Z DEBUG mozak_runner::ecall] VM TRACE LOG: Here is the deserialized struct: Account { id: 4660, owner: "Alice", balance: 10000 }
I have also added a macro debug_scope to include the extra code that might be needed for debugging with trace. The code inside this macro would be ignored when the "trace" feature is off.
We can now use
trace
ecalls to debug variables through macro with same name. Check out the new trace example Run withOutput:
I have also added a macro
debug_scope
to include the extra code that might be needed for debugging withtrace
. The code inside this macro would be ignored when the "trace" feature is off.