99 Chevy Cavalier -- Starts, Idles High, or stalls

I have a 99 cavalier 5spd with 179,000 miles on it. Most of the time it starts up fine, but in about one in four starts, the car takes about 10 seconds of cranking to start. Then, it chugs and wimpers a bit very lowly like its going to stall, but if you lightly tap the gas pedal, it starts up and revs high. It idles high for about 30 seconds before settling down to a normal idle speed. I’m afraid this is going to turn into a bigger problem, and I won’t be able to coax my car into starting at all.