From the command line, you can use : adb shell dumpsys activity
It prints a lot of stuff, including the activity stack.
http://stackoverflow.com/questions/4387875/view-activity-stack-in-android
http://stackoverflow.com/questions/2442713/view-the-tasks-activity-stack