My son did the EXACT same thing. I finally just had to go cold turkey and stop giving him the option of pull-ups. When we had used them up, I didn't buy any more and I told him we were out and he had to wear underwear. He held it for several days and had one nasty accident. After that he has always gone in the potty.
I have discovered with this and many other things that often the only way for a child to learn something is the hard way. We try so hard to shield our children from anything unpleasant, but that will not help them grow. Somteimtes they have to face and experience the hard things in life in order to learn.