If the designer can spare two host processor pins, this is the best way to go. Using the SPDT switch, Pin 1 Low indicates the switch is deactivated, and Pin 2 Low indicates it is activated. In other words, Switch Closure is determined by finding Pin 2 low, and Switch Release is determined by finding Pin 1 low.

This rarely used, but highly effective debounce method performs every bit as well as the best cross-coupled nand circuit when two pins are available for use with a single switch. Note that most microcontrollers provide programmable internal pull-up resistors for pins parameterized as inputs, in which case the circuit may be even further simplified by omitting the two resistors shown in the circuit drawing.