Advantages of call stack during debugging

The call stack can be useful in a number of situations during debugging:
1. The call stack lets us determine when a method is called too early i.e when we invoke the method before the data it requires to function is ready.
2. The call stack helps to determine when a method is called too late i.e after the event is over.
3. The call stack can also help you locate the source of an exception when the exception has been passed up from an underlying class.
4. The call stack also helps to see how the method is called when the method could be called from multiple locations.

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.