Can't figure how to debounce this

You need pullup resistors on the shift register input pins, 10K to +5V.