Foundry's built-in debugger is an opcode-level stepper; source-level breakpoints remain a pain point (#5765, #5510). soldb is an ETHDebug-first, LLDB-style Solidity debugger (REPL with break/step/print, DAP server, tx trace/simulate, per-line gas profiling) that falls back to legacy source maps, if there is no ETHDebug generated.
Some potential ways to do it:
forge test --debug / forge debug hand execution to soldb, either by linking soldb-debugger/soldb-repl (preferred: forge tests run in revm or evm2 in-process, so soldb can consume forge's step traces directly), or by shelling out to the CLI for on-chain txs (cast run)
- forge emits ETHDebug/legacy-source-mappings artifacts and auto-builds the
address:Contract:dir mappings from its traces
- later:
soldb-dap for IDE attach
Of course part of the problem is in compiler, so both solar and solc will need to generate proper debug info, so consumers such as soldb can consume it right.
The repo: https://github.com/walnuthq/soldb
Foundry's built-in debugger is an opcode-level stepper; source-level breakpoints remain a pain point (#5765, #5510).
soldbis an ETHDebug-first, LLDB-style Solidity debugger (REPL withbreak/step/print, DAP server,tx trace/simulate, per-line gas profiling) that falls back to legacy source maps, if there is noETHDebuggenerated.Some potential ways to do it:
forge test --debug / forge debughand execution tosoldb, either by linkingsoldb-debugger/soldb-repl(preferred:forge testsrun inrevmorevm2in-process, sosoldbcan consume forge's step traces directly), or by shelling out to the CLI for on-chain txs (cast run)address:Contract:dirmappings from its tracessoldb-dapfor IDE attachOf course part of the problem is in compiler, so both
solarandsolcwill need to generate proper debug info, so consumers such assoldbcan consume it right.The repo: https://github.com/walnuthq/soldb