How could I store a timeline for every button press, variable change, and in all every single change that happens to my turtle Drawing Program?

How could I store a timeline for every button press, variable change, and in all every single change that happens to my turtle Drawing Program?

Hello Code.org Forms, I am making a turtle proof of concept drawing program, the thing you draw with is the turtle. This program is designed to demonstrate how you can customize the turtle in various ways, including changing its width, dot, movement, and angle, as well as its color.

I have added lots of features and a new feature that i thinking that I could add is undo/redo and zooming, I know that you cant zoom the app lab screen or undo/redo a turtle, so i tough of creating a list that tracks all changes in my program with timestamps for my code to grab from, then using math to chnaeg numbers to draw on the screen again after its cleared. same for the undo and redo.

If you understand what I am trying to do, am I on the right track, and/or are there any learning resources or projects showing this off?