How do you show frame raster time on a NES?
Turn bit 0 of $2001 on (1) for 200-500 cycles, then turn it back off. This will make a gray stripe across the screen. To color the stripe, use one or more of bits 7, 6, and 5 of $2001.
Or you can use any other mask bits of your choice, such as leftmost column background enable/disable.