Skip to content

forge debug behaviour is incoherent with what's provided in the docs #4722

@Fabien-Morrow

Description

@Fabien-Morrow

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (b44b045 2023-02-21T00:11:41.592203605Z)

What command(s) is the bug in?

forge debug

Operating System

Linux

Describe the bug

Create this snippet

// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

contract Mwe {
    uint256 value;

    function set(uint256 x_) external {
        value = x_;
    }

    function run() external {}
}

forge debug src/Mwe.sol --sig "0x60fe47b10000000000000000000000000000000000000000000000000000000000000007" raises

[⠆] Compiling...
No files changed, compilation skipped
Error: 
Invalid hex calldata

Context:
- Invalid character 'x' at position 1

but forge debug src/Mwe.sol --sig 60fe47b10000000000000000000000000000000000000000000000000000000000000007 runs fine.

However it's not coherent with what's written here :
image

Team should either modify forge debug behaviour or acknowledge there's a mistake in the doc. If you choose the second solution, I'll be happy to open a pull request on the doc to fix it :)

Thx for your hard work and theses incredibles tools !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions