attachInterrupt and/or Serial.print (ESP32)

For me, button debounce starts with hardware. I do not use software debounce.

You might find results doing a search using words such as "button debounce circuit"

USE CODE TAGS WHEN POSTING CODE!