(But way more efficient methods certainly exist as the GBA emulator [https://youtu.be/Sfc_1NKbiKg SkyEmu demonstrated super long rewind] while needing very few RAM)
For debugging, going back to the previous instruction is easily implemented. The emulator stores the time when that the previous instruction was executed to so that he can go back just before to that executioninstruction. In the same way, emulators can provide access to the previous HBL, IRQ, VBL, etc.
= Emulator accuracy checking tools =