Saving Animations for Instant Replay

I’m creating an instant replay system for debugging and I need to save animation data each frame so that I can replay it back. I’m having trouble finding where I can access the current animation playing and what part of that animation is playing on a particular frame. And then what methods can I call to set a skeleton to a specific part of an animation? I’m doing this in C++