4

Debug button doesn't work on Remix when targeting a live smart contract. What are my other options?

Can I copy the current main Ethereum network snapshot with ganache and then run my own transactions?

I want to copy the current state, so redeploying the contract to a test network is not an option.

  • Can't you recreate the current state on the testnet? – Teleporting Goat Mar 12 '18 at 13:02
3

Truffle team recently released Portable Solidity Debugger that can be used to debug transactions on the main Ethereum network as they claim http://truffleframework.com/blog/announcing-full-portable-solidity-debugger

we built it to work with any Ethereum client, so you could debug transactions against the main Ethereum network if you so desired

truffle debug <tx hash>

It supports:

  • Code stepping (over, into, out, next, instruction, etc.)
  • Current code location, including the address of the running contract
  • Breakpoints
  • Watch expressions
  • Variable inspection (stack, memory and storage)
  • Custom expression evaluation using Solidity variables

I suspect it relies on transaction tracing so you will need a full archival node.

  • 1
    Awesome news, makes me happy to see Ethererum ecosystem going forward every day :) – EralpB Mar 12 '18 at 15:02
  • Couple of gotchas with this for anyone trying to debug: 1. This only works with a geth full node (not fast synced) with the debug rpcapi option enabled. It will NOT work with parity since parity does not understand debug_traceTransaction. 2. Although this is not related to the question, by consequence it will not work with the kovan testnet. – coolboyjules Oct 11 '18 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.