0

After testing a smart contract with several test cases, in some cases it reverts back and says

errored: Error occured: revert. revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the transaction to get more information.

There is no details of the line of code from where the error came, is there any way to identify the exact line in code from where the error thrown?

1 Answer 1

0

In the Remix terminal, next to the failed transaction (or a successful one, doesn't matter), just hit Debug and then you can step through the function.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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