Generates a log of the stack at all points in a program.