At any time, if the pan becomes too dry, add a splash of water. This will pick up the fond from the pan, coating the onions, and you can continue cooking. Sometimes you'll need to do this once or twice, others not at all. Just depends on how well the fat from the butter holds up.