All you want is a fried egg...but the yolk breaks when you crack the egg into the pan, so you have to make scrambled instead. Still good, but not a fried egg.
Next time, crack the egg into a cup or small bowl, not directly into the pan. If the yolk breaks you can save the egg for your next baking adventure.
You might also consider pre-cracking eggs into a small bowl or cup when making cookies or cakes. Doing so will give you a chance to pick out any stray bits of shell before they end up in the batter.