Wow, a seemingly simple thing like that could ruin your day. As I think about it, I would not have anything on my person to fix something like that. I guess I'd have to take out the shoelace and make that into an improvised sole binding/shoelace for the walk back home.

I'm surprised that a sole would be glued (rather than stitched) on to a hiking boot (assuming yours were glued - I can't imagine a stitched sole just falling off). I remember way back when as I bought a pair of hiking boots for backpacking, the salesman was telling me all about the "Norwegian welt" that held the sole on and how robust that was. But that was back in the day when a "hiking boot" was more like what we might call a "mountaineering boot" today. Those old Vasque (or was it Raichle?) brand leather boots were super tough, super thick, and super heavy. I remember having to do a significant amount of break-in to get the boots ready for the trail. Modern hiking boots are probably a lot lighter and higher tech. I haven't bought a new pair in decades. I guess I should go look into some. But I'll have to remember to carry some duct tape or paracord for emergencies. Thanks for the heads up ... I never would have thought of this problem.