Debugging trick to dump call stack of current thread

Although an app crash will generate a stack trace, it can be helpful to view the call stack while an app is running.

The following code will display an array of strings representing the call stack for the current thread.

The output will show the call stack as follows: