A fairly common problem can be the wire connection(s) right at the headlight which, over time, can become weakened by heat damage and corrosion. It can even cause intermittent power to the bulb. When cold, there's minimal continuity. When hot, NO continuity.
In order to test for that you can disconnect the plug on the back of the headlight and run a jumper from the fuse box battery connection to the connecting pin on the headlight assembly. (You'll also have to jump the common ground pin to chassis.) If the bulb illuminates for a while then goes dark, then you know the problem is in the headlight and not upstream in the fuse/CEM/Switch/etc.
|