1

I want to see the complete trace of the function call whenever I run any contract in truffle. Can I do that. From the complete trace I mean if a function calls another function and so on, I want to see in which orders they call each other and if possible then also the values.

1

It might not be exactly what you're looking for, but Truffle has an interactive debugger built in. Have you tried it? You can read about it here.

Basically you run truffle debug <transaction-id> to start the debugger and see the transaction being executed step by step.

| improve this answer | |
  • Thanks for telling about this feature of the truffle. But my problem is that I want to generate a dynamic call graph and therefore I want to know the exact flow of the function calls. I tried to trace it through the transaction-id logged in the testrpc console but I am not getting exactly what I want. Is there any way I can get it? – anand011090 May 22 '18 at 5:21
1

You are looking for something like the printStackTrace() in Java? This may be helpful:

https://medium.com/tenderly/how-to-debug-solidity-smart-contracts-with-tenderly-and-truffle-da995cfe098f

| improve this answer | |

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.