Debug your Solidity smart contracts directly in Visual Studio Code with step-by-step execution, breakpoints, and variable inspection.
Before using the extension, make sure you have:
-
soldb installed and available in your PATH
Install soldb: Quick Start Guide
# Check if installed soldb --version -
solc (Solidity compiler) version at least 0.8.29 is installed
# Check if installed solc --version -
A running RPC node (e.g., Anvil)
# For local development, start Anvil anvil --steps-tracing
-
Create launch configuration
Create
.vscode/launch.jsonin your project root:{ "version": "0.2.0", "configurations": [ { "name": "SolDB", "type": "soldb", "request": "launch" } ] } -
Open your Solidity file in the editor
-
Start debugging by pressing
F5or clicking the debug button
That's it! The extension will automatically:
- Detect your workspace and Solidity files
- Compile contracts with debugging information
- Connect to your RPC (default:
http://localhost:8545) - Start monitoring for transactions
The extension watches your blockchain for transactions and lets you debug them.
- Start a debug session (F5)
- Deploy or interact with your contract (using Remix, Foundry, or any tool)
- View transactions in the "Transactions" panel (left sidebar)
- Click a transaction to start debugging it
- Set breakpoints in your Solidity code and step through execution
- Check the soldb documentation
- Open an issue on GitHub
- Make sure your
soldbandsolcversions are compatible