Portable Solidity debugger library, for use with or without Truffle.
- Solidity stepping and breakpoints
- Variable inspection
- Watch expressions
- and more!
API Documentation for this library can be found at trufflesuite.github.io/truffle-conflux-debugger.
⚠️ This documentation is currently a work in progress.
Please see the reference integration provided by the
truffle debug command.
To start a truffle-conflux-debugger session, you'll need the following:
txHash- A transaction hash (prefixed with
0x), for the transaction to debug
provider- A web3 provider instance (see web3.js)
contracts- An array of contract objects, with the following properties:
contractName- The name of the contract
source- The full Solidity source code
sourcePath- (optional) the path to the Solidity file on disk
ast- The Solidity compiler's output AST (new style, not
0x-prefixed string with the binary used to create a contract instance
sourceMap- The Solidity compiler output source map for the creation binary
0x-prefixed string with the on-chain binary for a contract instance
deployedSourceMap- The source map corresponding to the on-chain binary (from the Solidity compiler)
Optionally (and recommended), you can also provide a
files- An array of sourcePaths representing file indexes (from
- Start the debugger session by constructing a Debugger instance with
;let bugger = await Debugger;let session = bugger;
- Resolve the session's
- Use the provided public methods on the
sessioninstance in order to step through the trace for the transaction:
- Access data provided by the debugger via the
session.view()interface, and the provided selectors:
let ast data evm solidity trace = Debuggerselectors;let variables = session;let sourceRange = session;
Useful API Docs References
- Docs for selectors:
It's our goal that this library should serve as a reliable and well-maintained tool for the Solidity ecosystem. Ultimately, we hope to support all language features and meet the varied requirements of a mature debugging library.
We believe that a good Solidity debugger belongs to the community. We welcome, with our most humble gratitude, any and all community efforts in bringing this debugger closer to that goal. If you find something broken or missing, please open an issue!
Some other ideas for how to get involved:
- Bug fix PRs
- Documentation improvements
- Additional tests - unit tests and integration
- Technical discussion (ways to improve architecture, etc.)
Thank you for all the continued support. 🙇