When your car shuts off when you hit the brake pedal, it can be a very dangerous situation. It can cause a serious accident, especially when you are driving at high speed or on a highway. The first thing you should do when your car shuts off when you press the brake is to check for any obvious issues.
You should also check the electrical system of your vehicle to make sure everything is connected properly. The next thing you should do is to try to restart your car to see if it will continue to run. If it does not start, you should call a professional to help you get your car back on the road.
Another possible reason why your car shuts off when you press the breaks is that there could be a problem with the brake light switch. If this is the case, then you should have the brake light switch replaced.
The next possibility is that there might be a problem with your oxygen sensor. This sensor is located in your exhaust system and it sends information to the engine control unit about how much unburned oxygen is in the exhaust. If the oxygen sensor becomes gunked up with oil or if there is a bad air to fuel mixture, it can cause your car to shut off when you apply the brakes.
A vacuum leak in the brake booster hose can also cause your car to shut off when you press the breaks. This can be identified by listening for hissing sounds from your engine while idling and by noticing a decline in engine performance.