The car stall while idling, however when the gas pedal is depressed, the car will continue running.
Car Problem Diagnosis
When a fuel injected car stall while idling, but will continue to run when the gas pedal is depressed just about when the engine will stall can only cause a faulty idle air by pass valve. Idle air bypass valve can be found on a fuel injected cars, this device is the one that maintains the idle speed on the car engine. When this device is faulty it will make the engine to stall, however when the gas pedal was depressed it increases the throttle which in turn give the engine just enough fuel to stay running.
Possible Cause of Car Stalling on Fuel Injection Engine
Faulty idle air bypass valve
All About Auto Recommendation
Bring your car to a reputable auto repair shop and ask the mechanic to check the idle air bypass valve to confirm that it is indeed the problem, if the mechanic says that you have a faulty idle air bypass valve then you do not have any option but to replace the parts, however if the mechanic wants you to replace others parts, tell the mechanic that you need to observe first the performance of your car and return some other time for the replacement of other parts if necessary.