The car runs fine otherwise, just shutters and dies if the A/C is on and I'm idling. I put in new plugs and a purge valve, but the check engine light keeps going on and off over the past year. I replaced the purge valve a year ago and the spark plugs last month, the light went off for a few days after the valve was changed then it came back on, but then went off over the winter, then came back on a few months ago. I don't have an IAC valve for my model. She runs fine while going 40 or so with the A/C on. but as soon as I get to a light, within seconds she shutters and dies. She'll start right up as long as I turn the A/C off. The belt if fine too.
Please use the OBD2 scanner to know the DTC codes, if any being set by the car ECM and you are seeing a check engine light.
There are probably two technical aspects in case any car behaves like that; mechanical and electrical.
It would be easy to answer, if you could use OBD2 scanner available on the market (online) and tell us the DTC Codes set by your car ECM/ECU.
By the meantime, it seems your car engine is not able to bear the load of your AC compressor. As soon as you switch on the AC, the clutch in the compressor gear and pulley is engaged with the crank pulley. The compressor mechanically compresses the refrigerant. But sometimes compressor, the heart of any HVAC system fails to function properly and it generates lot much load on the car engine, so it stops at idling RPM.
The "divide and rule" is also a good tactic to pin-point the car issues. It reduces the pain of troubleshooting the car problems the like you are facing.
If you are a technically inclined do-it-yourselfer, temporarily remove the car AC belt and check if the car stops or not when you switch on the AC system. If not, then the problem is certainly with the AC compressor and/or the tensioner.
Nonetheless, if engine stops the same way after removal of the belt too, there might be some other electrical or sensor issues out there. So, the OBD2 scan results are needed for better diagnosis.
P.S. Please apply the general mantra of "safety first", all the time you do such test experiments !!