Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foundry debug: unknown address at #5410

Closed
2 tasks done
chen4903 opened this issue Jul 16, 2023 · 4 comments
Closed
2 tasks done

foundry debug: unknown address at #5410

chen4903 opened this issue Jul 16, 2023 · 4 comments
Labels
T-bug Type: bug

Comments

@chen4903
Copy link

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 (56adbe4 2023-07-16T07:03:29.896803000Z)

What command(s) is the bug in?

forge debug --debug

Operating System

Windows

Describe the bug

I use debug in foundry, but it doesn't show the contract code. I have read these two issues, but doesn't work. issues#2348 and issues#2947

2023/07/16  23:09    <DIR>          .
2023/07/16  21:15    <DIR>          ..
2023/07/16  23:09                33 .gas-snapshot
2023/07/16  21:15    <DIR>          .github
2023/07/16  21:15               156 .gitignore
2023/07/16  21:24               235 .gitmodules
2023/07/16  22:49    <DIR>          broadcast
2023/07/16  22:49    <DIR>          cache
2023/07/16  21:58               590 foundry.toml
2023/07/16  21:24    <DIR>          lib
2023/07/16  21:46    <DIR>          out
2023/07/16  21:25               140 remappings.txt
2023/07/16  21:15    <DIR>          script
2023/07/16  21:15    <DIR>          src
2023/07/16  21:15    <DIR>          test

input: forge debug --debug src/Counter.sol --sig "setMember()"

contract:

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract EvmStudy{

    uint256 public member;
    constructor(){}

    function setMember() public {
        member = 2;
    }
}
@chen4903 chen4903 added the T-bug Type: bug label Jul 16, 2023
@gakonst gakonst added this to Foundry Jul 16, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jul 16, 2023
@madlabman
Copy link

madlabman commented Aug 26, 2023

I have the same problem on Linux either on the latest version either at the mentioned 56adbe4 commit, although on 87bc53f it worked. So we can do a binary search, but on my laptop it takes to long to build foundry.

@madlabman
Copy link

So we can do a binary search, but on my laptop it takes to long to build foundry.

UPD. First bad commit for me is 6fbf017.

@ZaneH
Copy link

ZaneH commented Aug 31, 2023

OS: macOS 12.2.1 21D62 x86_64
Shell: zsh 5.8
CPU: Intel i7-9700F (8) @ 3.00GHz
Forge version: forge 0.2.0 (2f4a77e 2023-08-31T00:49:03.954803000Z)

I've been experiencing the same thing. I've only used forge test --debug .... I also just ran foundryup to get the latest updates and it still doesn't see the contracts while debugging.

Here's the command I'm using right now:

$ forge test -vvv --mc ReenterTest --debug "test_Attack()"

SCR-20230831-phgi

Folder layout
total 32
drwxr-xr-x  14 zane  staff   448B Aug 31 16:34 .
drwxr-xr-x   4 zane  staff   128B Aug 31 14:52 ..
drwxr-xr-x  13 zane  staff   416B Aug 31 14:52 .git
drwxr-xr-x   3 zane  staff    96B Aug 31 14:52 .github
-rw-r--r--   1 zane  staff   156B Aug 31 14:52 .gitignore
-rw-r--r--   1 zane  staff    97B Aug 31 14:52 .gitmodules
-rw-r--r--   1 zane  staff   980B Aug 31 14:52 README.md
drwxr-xr-x   3 zane  staff    96B Aug 31 16:34 cache
-rw-r--r--   1 zane  staff   170B Aug 31 14:52 foundry.toml
drwxr-xr-x   3 zane  staff    96B Aug 31 14:52 lib
drwxr-xr-x  23 zane  staff   736B Aug 31 16:34 out
drwxr-xr-x   3 zane  staff    96B Aug 31 14:52 script
drwxr-xr-x   3 zane  staff    96B Aug 31 16:32 src
drwxr-xr-x   3 zane  staff    96B Aug 31 16:32 test

Additional details:

  • Using Sepolia network (Alchemy URL)
  • Using createSelectFork(...) at a specified block

@zerosnacks
Copy link
Member

Unable to reproduce with given setup of OP

Marking as duplicate of #5435, continuing conversation there

Any minimal reproduction would still be very much appreciated

@zerosnacks zerosnacks closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
@jenpaff jenpaff moved this from Todo to Completed in Foundry Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

No branches or pull requests

4 participants