Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Debug for the Miden Assembly Playground #68

Closed
Tracked by #69
Dominik1999 opened this issue Feb 21, 2023 · 1 comment
Closed
Tracked by #69

Add Debug for the Miden Assembly Playground #68

Dominik1999 opened this issue Feb 21, 2023 · 1 comment
Labels
playground Issues for the Miden Assembly Playground

Comments

@Dominik1999
Copy link
Contributor

Dominik1999 commented Feb 21, 2023

We need to add a function to Debug to the playground. The Button is already there.

We can use the simple assembler debugger here 0xPolygonMiden/miden-vm#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.

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

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

The challenging question will be how the VmStateIterator can be stored in the state of the browser.

@Dominik1999
Copy link
Contributor Author

closed by #79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
playground Issues for the Miden Assembly Playground
Projects
None yet
Development

No branches or pull requests

1 participant