If you can, put it in a freezer. When frozen hard, it should all come off. You might have to pick at it a bit.
I went to iron DS1's trousers once & found chewing gum in the pocket. Yuck! But it came off ok after I froze them.
(If it was PVA glue, the directions on the big bottles we have at work say to soak the garment in a cold solution of washing powder overnight then rub to get the glue out before washing. Seems to work alright, but I usually don't spot glue on the boys clothes* until washed & dried, & you really need to soak before any washing.)
*Or I forget I've got glue on my clothes until washed & dried!