When pulses with low duration (bounce pulses) coming to the input pin they'r can't be detected. When you push the button pulse duration is more than 200mS and pulse can be detected. To simulate "bouncing" press the button few times fast. To make a control pulse hold it about 300mS. You can change period to monitoring