Closed Dominik1999 closed 1 year ago
We need to add a function to Debug to the playground. The Button is already there.
We can use the simple assembler debugger here https://github.com/0xPolygonMiden/miden-vm/pull/693.
However, we need to wrap it into a function to call something like
pub fn debug_program(masm_code: &str, inputs_frontend: &str, command: &str) -> Vec<u64> { ... }
Where command is !next, !play, !prev, !print.
!next
!play
!prev
!print
We will not be able to support all commands at the beginning.
We can simply call execute_iter() in here https://github.com/0xPolygonMiden/miden-vm/blob/360b5b080b79b9d66e912e2eb286a5237a261eb2/processor/src/lib.rs#L118-L138
execute_iter()
Then we have a VmStateIterator object on which we can call various debugging commands, see https://github.com/0xPolygonMiden/miden-vm/blob/360b5b080b79b9d66e912e2eb286a5237a261eb2/processor/src/debug.rs#L128
VmStateIterator
The challenging question will be how the VmStateIterator can be stored in the state of the browser.
closed by #79
We need to add a function to Debug to the playground. The Button is already there.
We can use the simple assembler debugger here https://github.com/0xPolygonMiden/miden-vm/pull/693.
However, we need to wrap it into a function to call something like
Where command is
!next
,!play
,!prev
,!print
.We will not be able to support all commands at the beginning.
We can simply call
execute_iter()
in here https://github.com/0xPolygonMiden/miden-vm/blob/360b5b080b79b9d66e912e2eb286a5237a261eb2/processor/src/lib.rs#L118-L138Then we have a
VmStateIterator
object on which we can call various debugging commands, see https://github.com/0xPolygonMiden/miden-vm/blob/360b5b080b79b9d66e912e2eb286a5237a261eb2/processor/src/debug.rs#L128The challenging question will be how the
VmStateIterator
can be stored in the state of the browser.