foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
7.91k stars 1.6k forks source link

forge debug cannot display code #3498

Open zrankn opened 1 year ago

zrankn commented 1 year ago

Component

Forge

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

What version of Foundry are you on?

forge 0.2.0 (ee88f75 2022-10-04T00:07:32.8134078Z)

What command(s) is the bug in?

forge debug --debug tokentest.sol --sig "testtrang()" --fork-url https://rpc.ankr.com/bsc

Operating System

macOS / Windows

Describe the bug

I want to debug the whole process of the function and watch the process and result of the code running, but when there is a function that calls other contract functions, I can't see the code that calls other contract functions。 And I can't debug tx hash photo_2022-10-15_11-31-25

zrankn commented 1 year ago

forge --version forge 0.2.0 (b554ab1 2022-10-15T00:07:41.079769Z) Execution error “Error: No input files detected.”

iFrostizz commented 1 year ago

afaik, forge is not pulling the contract code from etherscan for now. Easy fix is to download the code and reference to it locally.

ghost commented 1 year ago

afaik, forge is not pulling the contract code from etherscan for now. Easy fix is to download the code and reference to it locally.

How to reference to it locally. Is there a case study?