Just put another 10K-resistor from PortA-Pin to Vdd.
Then You can measure the voltage on the pin.

>= 0,7 * Vdd - the circuit is broken (Switch is open)

<= 0,3 * Vdd - the circuit is shortcut