Arduino Digital Inputs

I have a question about arduino inputs, Is it necessary to debounce all digital inputs to the arduino? or just the ones that have buttons on them?

Just ones with buttons/switches, where the mechanical nature of a button press has some physical bounce as the button opens or closes.

CrossRoads:
Just ones with buttons/switches, where the mechanical nature of a button press has some physical bounce as the button opens or closes.

okay thank you very much

It is not necessary to debounce all inputs. It is not necessary to debounce all switch inputs. If the very first transition will trigger an action then the switch will not need debouncing. But if the switch will be read repeatedly, as in counting presses, the button will need to be debounced so that the bounces will not be counted. So, in the case of a switch, it depends on the situation.