If you’ve established that the light bulb hasn’t burned out and that the outlet is receiving power, how do you figure out whether the problem is with the socket or the plug?
You’ll need a continuity tester, and you’ll need to remove the socket from the lamp frame. Unplug the lamp and remove the shade, the light bulb, and the harp (or frame) that supports the shade. Squeeze the socket’s outer shell at the base and gently work it off. Then slip off the insulating sleeve.
Clip the continuity tester wire to one plug blade and touch the probe to the silver screw on the socket. Then touch it to the brass screw. Clip the wire to the other plug blade and touch the probe to the silver screw on the socket. Then touch it to the brass screw. The tester should light with at least one combination in either case. If not, the cord is your problem and you’ll need to replace it.
To test the socket, clip the tester wire to the threaded collar and touch the probe to the brass screw. Turn or click the lamp’s on/off switch. The tester should also go on and off. If not, the socket is your problem, and you’ll need to replace it.
A continuity tester is very helpful for checking to see whether an electrical circuit is complete or broken. You can buy one for under $10 at hardware stores and home centers. Battery-powered, it’s made like a small flashlight with two probes. Complete instructions are included on the package.