Arduino button debouncing is not working

I copied the code for debouncing a button from here: http://arduino.cc/en/Tutorial/Debounce

However, this debouncing code is not working, because when I hold down the button, it still prints to serial like 100 times per second. I want it to only print a single time, no matter how long I hold down the button. Isn't debouncing supposed to take care of that?

thetaiter:
I copied the code for debouncing a button from here: http://arduino.cc/en/Tutorial/Debounce

However, this debouncing code is not working, because when I hold down the button, it still prints to serial like 100 times per second. I want it to only print a single time, no matter how long I hold down the button. Isn't debouncing supposed to take care of that?

Rubbish. I just looked at that code and there's not a Serial line anywhere in it.

What debouncing does is make sure that when the switch is just almost closed and the contacts are bouncing back and forth between conducting and non-conducting that doesn't look like a whole bunch of separate buttin presses.

What you need to think about is state change. You're probably printing anytime the button IS pressed instead of only printing when it BECOMES pressed.