Rasberry Pi Pico/RP2040 protip: Use sideset pins to visualize when different PIO instructions run.
I had a neat aliasing bug where I was sampling a signal much too slowly. The routine worked fine when receiving a signal generated from a completely different device, but not at all when generated by a device that was the same clock frequency as the receiver. With the sideset pins I was able to very clearly see when the sampling happened, and diagnose the problem.