Pterosaurs are chiefly known by their post-cranial traits.
Here (Fig. 1) a diagram is presented of pterosaur ancestor skulls in phylogenetic order. Alongside this diagram is a list of general trends documented from the tritosaur lepidosaur, Huehuecuetzpalli (at top), to Macrocnemus to Cosesaurus to Longisquama and culminating with the basal pterosaur, Bergamodactylus (at bottom).

Figure 1. Skulls of pterosaur ancestors from Huehuecuetzpalli through Macrocnemus, Cosesaurus, Longisquama and the pterosaur Bergamodactylus.
Huehuecuetzpalli never fits well
into traditional squamate cladograms because it is not a member of the Squamata.
Earlier we looked at the gradual evolution
of the manus in these taxa (Fig. 2). You won’t find evidence like this ‘out there’ in the academic literature where PhDs continue to say, “We still don’t know the ancestors to pterosaurs.” This is rather embarrassing for them, if not now, then someday.
Addendum: originally published online on Facebook yesterday:
For my paleo friends… this is Cosesaurus (Fig. 3), a lepidosaur, not closely related to living lizards, that was able to run bipedally, like some living lizards do by convergence. It had sprawling limbs, but created a narrow gauge trackway matching Early to Middle Triassic Rotodactylus footprints found from Europe to North America. Lateral toe (#5) uniquely bent back to imprint dorsal side down behind the other four regular toes.

Figure 3. Click to enlarge and animate. Cosesaurus flapping – fast. There should be a difference in the two speeds. If not, apologies. Also, there should be some bounce in the tail and neck, but that would involve more effort and physics.
The curved, stem-like, immobile coracoid is an indicator of flapping (birds share this trait), matched to a strap-like scapula (birds share this trait). The interclavicle overlaps the sternum and clavicles to create a pre-sternal complex, as in pterosaurs. A tiny pterosaur-like prepubis is present. So is an anterior projection of the ilium (top pelvic bone) typically found only in bipeds. Two wrist bones migrated to the thumb side of the wrist to create a pteroid and preaxial carpal, otherwise only found in pterosaurs (but similar, by convergence, to the panda’s ‘thumb’). The tail is extremely narrow and stiff.
Extradermal membranes extend from the crest of the skull to the back of the pelvis. Fibers (pre-wings) trail the forelimbs. A membrane trails each hind limb. These and many other traits are shared with pterosaurs, the flying reptiles of the Mesozoic.
Like birds, pterosaur ancestors used their decorative traits (feathers, membranes) for display, including flapping prior to being able to fly. Running bipedally enabled breathing while running (something quadrupedal undulating lizards cannot do). Bipedal locomotion increased stamina and warmed up the metabolism. So secondary sexual traits (decorations and behavior for display) helped create both birds and pterosaurs.
I studied the one-of-a-kind fossil, a hand-sized mold of such exquisite detail that it also preserved a small jellyfish, in Barcelona in the 1990s where it was inappropriately wrapped in a few layers of toilet paper. In 2000 I described Cosesaurus as an ancestor to pterosaurs, and did so by adding it to four previously published phylogenetic analyses.
Unfortunately, that peer-reviewed and academically published paper has been ignored ever since, for reasons I still cannot fathom other than I have no science degree, let alone a PhD. To this day paleontologists repeat the phrase, “We still don’t know where pterosaurs come from.” Frustrating, but I’ve gotten used to it. I guess this posting is just a chance to vent.
For more exquisite Cosesaurus details, click here: http://reptileevolution.com/cosesaurus.htm