Remix IDE Cheatsheet

Debugging

Use this Remix IDE reference while you build software engineering projects, review code for technical interview prep, or polish examples for a software engineer resume.

Opening the Debugger

Two ways to start:

  1. Terminal — after any transaction, click the Debug button in its log row.
  2. Debugger plugin — click the bug icon in the left icon bar, paste a transaction hash, click Start Debugging.

The debugger only works on transactions executed in the current session (VM) or against a node that supports debug_traceTransaction (local Hardhat/Anvil, some testnets via Tenderly).

Debugger UI Panels

PanelContent
Navigation controlsStep Into / Over / Back / Jump to error
SliderDrag to any step in the execution trace
Solidity LocalsLocal variable values at current step
Solidity StateContract storage variables at current step
Call StackFunction call hierarchy
OpcodesEVM opcode at cursor, with stack/memory
StackRaw EVM stack values
MemoryRaw memory (hex)
StorageFull storage layout at current step
Return ValueOutput of the call being debugged

Setting Breakpoints

  1. Open the source file in the editor.
  2. Click the gutter (left margin) next to a line number — a red dot appears.
  3. Press Play in the debugger — execution pauses at that line.

Remove a breakpoint by clicking the red dot again.

Reading Solidity Locals

The Solidity Locals panel shows named variables as the Solidity compiler maps them to the EVM, for example:

amount  uint256  1000000000000000000
to      address  0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2
success bool     true

Variable values are only available if the contract was compiled without heavy optimization (high runs count can inline / remove variables).

Identifying a Revert

  1. Click Debug on a failed transaction (red in terminal).
  2. Click Jump to error (⏭) — the debugger lands on the failing opcode (REVERT).
  3. Check Solidity Locals and Call Stack to see what triggered it.
  4. The Return Value panel shows the revert reason string if one was provided.
require(balance >= amount, "Insufficient balance");
// Debugger will land here and show reason: "Insufficient balance"

Inspecting Storage at a Step

The Storage panel shows the full slot layout at the current execution step — useful for tracking storage corruption bugs.

SlotKeyValue
0x00totalSupply1000000
0x01balances[0xAb8...]500000

Debugging with console.log

hardhat/console.sol works directly in the Remix VM — no local node needed. Import it, deploy in any Remix VM environment, and console.log output prints straight into the Remix terminal with each transaction.

When connected to a local Hardhat or Anvil node instead, the same statements print to the node's own terminal (not Remix) — switch to your CLI to read the output.

import "hardhat/console.sol";

function transfer(address to, uint256 amount) external {
    console.log("Transferring", amount, "to", to);
    // ...
}

Common Debug Scenarios

SymptomWhat to look for
Transaction reverts with no reasonJump to error → check require / assert that lacks a message
Wrong return valueStep through and watch Solidity Locals change
Unexpected storage stateCheck Storage panel step-by-step across a loop
Out-of-gasOpcode panel shows STOP at gas = 0; identify expensive loop
ReentrancyCall Stack shows recursive entries of the same function

Tenderly Integration (Testnet Debugging)

For testnet transactions:

  1. Install the Tenderly plugin from the Plugin Manager.
  2. Authenticate with a Tenderly account.
  3. Paste a Sepolia (or other supported testnet) tx hash — Tenderly provides a full step-through debugger with named variables, even for already-mined transactions.