GMS2 Can't recreate collision bug, but it still exists

So I have this little arcade enemy swarm game. The combat system is that when you press the button, the protagonist is unmovable but summons a magic spell that you can then control directionally and detonate over nearing enemies to clear them. This will then create an orb object that shoots back towards the player, and the collision will cause the player to draw a new sprite animation before reverting back to normal and being controllable again. However, twice now in hundreds of test runs, the character will suddenly draw it's default sprite and be completely unmovable. This happens while the spell instance already exists, but it will destroy it in the process. As a more general question, besides having your variable values drawn to the screen, is there any sort of way in the debugger to recreate moments to analyze them? It's frustrating because I can't willingly make this glitch happen to test if my new codes work. Thanks

Photos are of the protagonists step event.
After the sprites get drawn, there are events where the sprite ends to further the mechanic each time a spell instance is created



Friendly Tyrant
Forum Staff
Look at using breakpoints along with the debugger to step through problem code. As for repeating sections, the usual process for me would be to have a special debug key that contains the code to be tested, so when that key is pressed it runs the same code every time. For the issue with the player being stuck, it might be worthwhile checking where you set the "Jaredcontrol" variable to true (not shown in the screenshots) as that would stop any input if it's not being set back to true again.