I kept popping-off the button on my favorite pair of khakis (too much pie, I reckon). I'd sew it back on with my WWII vintage pocket sewing kit and it'd hold for awhile... then "POP!", off it comes again...
Then I read about using dental floss. As thin as thread but many times stronger.
Now the button stays put and I can have all the pastries I can stand!
Skillet