Wysdom
Inspector

Variable inspector

Understanding and using the variable inspector in Wysdom notebooks

The Inspector Panel is a powerful debugging and state inspection tool that helps you analyze your Solidity code in real-time.

Extensions side panel

Every time you compile a variable, function, contract, struct or library it gets added to the inspector panel to view.

Extensions side panel

What Gets Added to the Inspector

1. Variables

The inspector automatically tracks:

// Cell 1: Elementary types
uint256 num = 42          // Shows up as "num: uint256"
address addr = msg.sender // Shows up as "addr: address"

2. Data Structures

Complex types are displayed hierarchically:

// Cell 1: Mappings
mapping(address => uint256) myMap  // Shows as "myMap: address => uint256"
 
// Cell 2: Arrays
uint256[] arr  // Displays as "arr: uint256[]"

3. Custom Types

User-defined types are fully inspectable:

// Cell 1: Struct definition
struct MyStruct {
    uint256 value1
    address value2
}
 
// Cell 2: Using the struct
MyStruct myStruct  // Shows full struct hierarchy

4. Contracts

When you define a contract, the inspector shows:

  • All state variables
  • Function list with signatures
  • Inherited contracts
  • Events and modifiers
// Cell 1: Contract example
contract MyContract {
    uint256 private value
    
    function setValue(uint256 newValue) {
        value = newValue
    }
}

5. Libraries

Library functions and their signatures appear in the inspector:

// Cell 1: Library example
library MathLib {
    function add(uint256 a, uint256 b) returns (uint256) {
        return a + b
    }
}

Real-time Updates

The Inspector Panel updates automatically when:

  1. New code is compiled
  2. Variables change value
  3. Functions are called
  4. State is modified

Tracking Changes

// Cell 1: Define contract
contract Counter {
    uint256 count = 0
    
    function increment() {
        count += 1    // Inspector shows updated count
    }
}
// Cell 2: Watch changes
counter = Counter()
counter.increment()   // Inspector updates count value

On this page