Using a button to continue your loop, or to break in switch case

The complete code will be helpful. Also how sure are you that you connected the button correctly? Have you tested the button?