How do you know if you need to replace the crankshaft position sensor?

If the car doesn't start, but the belts are good, the fuel system is good, the ignition is good, everything is good, but you don't know whats wrong, then its the sensor lol