the ice/freeze it really hard people have the right idea I think, after that wash it with a little wisk poured directly where it was, I had gum on a shirt once and it left something that looked a bit like an oil stain behind after I removed it.
also if it’s really mashed in you might try scraping the inside of the jeans first to loosen anything that’s pushed deep/through the fibers, then chip away the main wad.