Analog button with noisy switch. What could be the proper way to debounce

A debounce time 0f 10 to maximum 25 ms would be normal.
What controller are You using?
Where is the declaration of the switch button pin? I don't find it.
How is it wired? Schematics would be helpful.

Here's a good topic to read: How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum