Add debug variable locations tracking#17
Draft
djolertrk wants to merge 6 commits into0xMiden:nextfrom
Draft
Conversation
Collaborator
Author
|
Please note that this has some commits that I will remove from the PR (like the ones that point to the local miden-vm, and some commits for porting it to miden-vm v20 needed for the assert debugging feature -- those are just leftovers from local). But, when using https://github.com/walnuthq/miden-vm/tree/feature/debug-variable-locations-v0.19.1 and 0xMiden/compiler#820, it is able to print real values during debugging session! Test the |
This was referenced Jan 19, 2026
Collaborator
Author
|
Part of it ready for review at: #18 |
Replace the old VmStateIterator/VmState/Process API with the new FastProcessor + ResumeContext stepping API. Key changes: - Rewrite DebugExecutor to use FastProcessor::step() with noop-waker polling, so we avoid tokio runtime conflict in TUI - Rewrite DebuggerHost to implement the unified Host trait - Replace MemoryChiplet with direct Memory type from processor - Update Felt API - Update StackInputs::new() to take &[Felt] slice - Remove AssemblyOp::cycle_idx() usage
Implement debug variable inspection by querying the MAST forest directly at each step: - Add DebugVarTracker that records variables from forest.debug_vars_for_operation() - Add resolve_variable_value() for Stack/Memory/Const/Local/Expression locations - Add format_variables() with FMP-based local variable resolution - Add :vars/:variables/:locals commands to TUI - Add REPL mode (--repl flag) with rustyline for interactive debugging - Add REPL commands: step, next, continue, finish, break, stack, vars, etc.
b960a98 to
e850d05
Compare
Collaborator
Author
|
it depends on #30. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enables us to use
:varsin the debugger and it will print variables values.