FRAME_STEPPING
.
Yep, just a dot in the command line.
A very helpful debugging tool, built into PICO-8 since version 0.2.0, this command lets you run your game for one single frame. It will call _update and _draw once, then stop the game and return to the command line.
While hunting for the cause of a strange bug, you will likely want to run the game and try to reproduce the bug. Sometimes that is enough to know how to fix it, while perhaps more often that isn't enough because everything happens so quickly and you need more precise information about what is happening. With this command, you can now run your game and approach the moment that the bug happens, then press escape to stop your game.
Once the game is stopped, you can use this command to resume the game but only advance by one frame. This will let you see what is happening in your game in slo-mo and take the time you need to view any debugging messages you print to the screen every frame (try the echo system for that).
PICO-8 also has a built-in shortcut to enter this frame-stepping command and run it a second time.
After you have used the command once, you can continue frame stepping in PICO-8 by simply pressing enter again and again to walk step-by-step through your game and read the debugging messages every frame.
This should really help you narrow down the causes of your bug until you find it.
160
1 Jun 2025