Astronomers have reconstructed the final moments of a massive star before its dramatic supernova collapse.