Solidity REPL
Debugging & errors

Assembly memory

Run Yul memory instructions and inspect stack, memory, and opcodes.

Solidity 0.8.36REPL modeDebug capture

Why use this example

Use this pattern to reproduce a failure or follow an execution from Solidity source into calls and EVM opcodes. The entry isolates assembly memory so its input, result, and state changes stay easy to compare.

Solidity to run

uint256 answer
assembly { let ptr := mload(0x40) mstore(ptr, 42) answer := mload(ptr) }
answer

What to expect

The Yul block stores and loads 42 from memory; debug capture makes the related stack, memory, and opcodes inspectable.

Continue the investigation

Change a value, add another expression, or open Inspect after the run. Accepted entries remain available to the next entry, and the clean replay keeps the complete result reproducible.

Read about debugging Execution diagnosis