Shuts off when hot?

When it fails to start, remove a plug lead & lay the lead on the valve cover, screwdriver inside; create a 3/16" to 1/4" air gap. Crank & watch for white/blue spark. No spark: obvious; yellow spark = weak spark.