In all my years of performing I have only twice broken a guitar string in public. I guess by the law of averages that makes me very lucky. If you are in a group you can, In a good many years of performing I can only remember breaking a guitar string in public twice which, I think, makes me very lucky. You can, to some extent, get away with it by relying on others if you are in a band. If you are, like me, solo, you can't. Both times I had a contingency plan, as follows. Make sure that you have a good length anecdote/witty story/unaccompanied song you can do while removing the old string and fitting the new. (Yes, you can sing and remove/fit a string at the same time, though you cannot, of course, tune the new string.) When this anecdote/story/unaccompanied song (preferably song, in my opinion) is finished, the next song should have a lengthy introduction/explanation so that you can tune the new string and talk at the same time. While all this is going on the set is, hopefully as far as the audience is concerned, going on as normal.