midenc-execution-trace

Trace MASM VM execution and print stack state after each instruction.

Updated Jan 1, 2026
One-click install
npx skills add https://github.com/greenhat/agent-skills --skill midenc-execution-trace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: midenc-execution-trace
Source: https://github.com/greenhat/agent-skills/tree/main/trace
Command: npx skills add https://github.com/greenhat/agent-skills --skill midenc-execution-trace

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables tracing MASM execution to understand the stack state after each instruction, helping debug Miden compiler runs and tests.

Core Features & Use Cases

  • Step-by-step MASM execution trace that prints the current stack after every instruction.
  • Guided workflow for reproducing issues on the smallest test and comparing traces against expected stack discipline.
  • Practical tips for integrating with the emit tool when needed during debugging.

Quick Start

MIDENC_TRACE=executor=trace cargo make test --no-capture <test_name_or_filter> MIDENC_TRACE=executor=trace cargo make test <test_name_or_filter> MIDENC_TRACE=executor=trace cargo make test --success-output immediate <test_name_or_filter>

Frequently Asked Questions about midenc-execution-trace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace MASM VM execution to inspect the stack state during debugging?

To trace MASM VM execution and inspect the stack state, run tests using the MIDENC_TRACE=executor=trace environment variable combined with cargo make test. This produces a live execution trace printing the stack after every instruction.

What is the best way to debug failing Miden compiler tests using MASM traces?

Debug failing Miden compiler tests by reproducing the issue on the smallest test case and running it with MASM traces enabled. You can then compare the live instruction-by-instruction stack state against the expected stack discipline to pinpoint failures.

Do I need cargo make to generate MASM execution traces?

Yes, integrating with cargo make test is required to generate MASM execution traces. You must execute your test commands through cargo make while setting the MIDENC_TRACE=executor=trace environment variable to output the live stack state.

Can I view MASM trace output immediately as a test runs?

Yes, you can view MASM trace output immediately during test execution by passing the --success-output immediate flag. This ensures the MASM stack state is printed live as instructions are processed rather than being buffered until completion.

Why does my MASM stack trace not show output for passing tests?

MASM stack trace output for passing tests is often hidden by default. You need to use the --no-capture flag or --success-output immediate flag with cargo make test to force the MASM VM execution trace to display.

When do I need to trace the MASM VM stack state?

You need to trace the MASM VM stack state when implementing Miden compiler changes that require MASM traces or when debugging failing tests. It helps you understand the stack state after each instruction to validate stack discipline.