break pedal and crankshart sensor on 2000 Saturn LS

check engine light says crankshaft position sensor is bad where is it also i drove home last night and parked the car in the morning when i tried to start the car i put my foot on the break pedal and the power in the car shuts off what could cause that

Asked by for the 2000 Saturn LS
did you have the code pulled or a real diag??? codes only point you in a direction of a failure.
the crank sensor is on the harmonic balancer in the front of the motor.
i would look at all your connections starting with the battery cables.

all connections seen good also before it stopped working the key sometimes wouldnt turn all the way off unless u moved the shifter back and forth in park now when u step on the brake pedal all power cuts off and the key will turn to the on position without pressing the break and when u turn the key to start the starter clicks and then all power shuts off