Is there any way to debug a Solidity smart contract with a GUI, like remix?

How can I do it for both testnets and mainnet?


I wrote an article about how to do just this!

You can use remixd and remix to test and debug your contracts with a GUI (remix). The steps to do this are:

  1. Install remixd with npm install -g remixd
  2. Run remixd with remixd -s <absolute-path> --remix-ide https://remix.ethereum.org
  3. Attach your project to remix.ethereum.org
  4. Run ganache-cli in the terminal with ganache-cli
  5. Choose “Web3 Provider” as your “Environment” in remix
  6. Test your code with a GUI (remix)

The article dives deeper into each step, but you should be able to achieve your goals with just those 6 steps!

How can I do it for both testnets and mainnet?

You can perform the same steps above on mainnet or a testnet by connected Remix to a node on one of those networks. When prompted with the "Environment" in remix, you would simply use a node on the desired network!

  • Hey, I would like to debug a transaction that has been confirmed on the blockchain. How can I do this? I have figured out how to load in a deployed smart contract, but can't figure out how to load in a mined transaction. Jun 30 at 12:35
  • Edit: I have figured out that you can enable a debug pane on the left by enabling the debugging plugin, however when I debug a transaction all sections say "no data available", and I can't debug anything. Jun 30 at 12:52

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.