Skip to content

bug(forge test --debug): debugger does not open if setUp reverts #10322

Open
@e1Ru1o

Description

@e1Ru1o

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.0.0-stable Commit SHA: e144b82

What version of Foundryup are you on?

foundryup: 1.0.1

What command(s) is the bug in?

forge test --mt someTest --debug

Operating System

macOS (Apple Silicon)

Describe the bug

Tests where the setUp fail don't open the debugger. E.g.

import {Test} from "@forge-std/Test.sol";

contract TestTest is Test {
    function setUp() public {
        revert();
    }

    function testFoo() public {}
}

Then forge test --mc TestTest --debug just fails

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions