Solidity REPL
VM helpers

Keep state between runs

Run repeatedly to watch a stored counter continue from its last value.

Solidity 0.8.36Source mode

Why use this example

Use this pattern to shape local EVM state directly while keeping the setup and its visible effect in the same investigation. The entry isolates keep state between runs so its input, result, and state changes stay easy to compare.

Solidity to run

uint256 public count
count++
count

What to expect

Each manual run increments count again because Source mode keeps the local EVM state between executions.

This case waits for you to select Run. The example opens with every required field already prepared.

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 VM helpers Execution diagnosis