You may have noticed that some commercial aircraft have a trap door in the cockpit ceiling. Not only does it allow pilots to wave a flag but, on a more serious note, to evacuate the flight control area in case of an emergency – notably if the cockpit door is blocked.
To obtain certification, all airliners are obliged to offer a ‘way out’ for technical navigation crew, or pilots. It may simply be a sliding lateral window, or if there’s not enough space or the windows don’t open, a hatch or trap door.
Since a plane’s cockpit generally sits a few metres above the ground, so far nothing better than a good, strong rope has been found for getting out of a tight fix without getting hurt. Just throw it outside the hatch and slide down until you drop to earth.