This script works with any NTSC SNES game natively running at a resolution of 256×224 when emulated in Bizhawk. Also works with any other system running at that resolution.
It overlays a grid of 16×14=224 rectangles over the game area, adapting to any emulator window scaling, aspect correction, pillarboxing, and letterboxing. Each rectangle represents a 16×16 pixel area of native SNES resolution, allowing to approximate distances and sizes of in-game objects at a glance, useful for when relevant RAM addresses are not available or not required to get the job done.
Rectangles are purple by default as it is a high-visibility color that is rarely used in SNES palettes, but I've also left in gallery white (visible on pure white backgrounds) as an option. Or you can add your own color.
To make the grid more coarse, try 8 columns and 7 rows instead: this will reduce grid resolution to 32×32 px rectangles.
The script is made to only run once and have the grid linger until the emulator window changes dimensions, so it has zero performance cost. However, this makes it not directly compatible with scripts that update GUI drawings every frame as they would likely erase the grid. If you want the grid to be visible together with other Lua drawings, feel free to incorporate it in your scripts as you see fit.
This is not a replacement for a proper hitbox/tile viewer, but it's better than nothing.