I've had a couple of times where Gemini straight up tells me "Absolutely not, ..." and the explains how my assumptions are wrong and eventually leads me to find the right answer.
It's surprisingly good at reading my entire code, reading my assumptions of the code, and explaining what I'm getting wrong and how to fix it.