To troubleshoot an ignition switch, first identify the exact problem, such as the car not starting, the car starting but suddenly going off or some electrical components, such as the lights, clock and radio, not working. The key may also not come out of the ignition switch, even after turning off the engine.
There are two circumstances under which the engine may not start: after successfully turning the ignition switch or after the key fails to turn the ignition switch. If the former is true, the fault is in the starting circuit or the ignition switch itself. If you insert the key but it doesn't turn the ignition switch, jiggle the steering wheel back and forth, and then try turning the key again. Apply the same action if the key is stuck in the ignition switch. If this doesn't work, lubricate the switch, and then try again.
If the car's electrical components aren't working, the battery could be dead. If you're sure the battery is functional, check the battery cables to see if they are loose or corroded. If the engine starts but suddenly goes off, the ignition switch may be worn out; check its electrical contacts for signs of wear or corrosion. If this is the case, replace the ignition switch.