debugging is thinking about thinking - bugs in software are similar to "bugs" in us - it's possible to debug our thinking the same way as you can debug software
one realisation of this is Metacognition when Debugging - thinking about the possible problem in the algorithm allow us to think about our thinking process