I have a light switch on my bedroom closet that exhibits erratic behavior: about half the time when the switch is flipped from off to on, the light remains off. Flipping the switch back off and on eventually gets the light to turn on.
switch: off -> on -> off -> on -> off -> on
light: .off..................on...off.....on
How can I diagnose what's going on here?