Top 8 Debugging Interview Questions
Browse 8 real-world technical and behavioral interview questions about Debugging. Review scenarios, edge cases, and architectural best practices.
Your assessment includes a section where an AI assistant helps you fix a small repository. What is that section scoring?
An AI-assisted assessment section scores whether you understand the code before you change it, whether you verify every change by running the tests, and whether you can explain what you changed and why. The assistant speeds up reading and typing, but judgement is yours, and clever prompting earns nothing by itself.
You are dropped into an unfamiliar repository with one failing business rule and an AI assistant that only gives hints. What do you do in the first ten minutes?
Debugging an unfamiliar codebase starts by running the failing test, then reading it as the rule and tracing its call path to the code that computes the wrong value. Let the size of the error narrow the cause, ask the assistant to locate and explain rather than patch, and prove the fix with a test that failed before.
Your solution passes the sample tests and fails hidden ones. How do you find the edge case without seeing the tests?
Turn each constraint into a test: empty input, one element, the maximum size, duplicates, negatives, totals that overflow a 32-bit integer and inputs big enough to time out. Then compare your solution with a brute force on small random inputs; the first input where they disagree is your missing hidden test.
A pod is stuck in CrashLoopBackOff. How do you debug it?
Kubernetes CrashLoopBackOff debugging starts with the previous container logs, exit code and pod events. Then separate application crashes from liveness probe kills, bad configuration, missing dependencies and OOMKilled restarts.
A document was updated an hour ago and the assistant is still quoting the old version. Walk me through the diagnosis.
Ask the index directly whether the old text is still there, because that single check splits the problem into change detection, queue or write failure, a retire step that left duplicate chunks, or a downstream cache. Then fix the reason you learned about it from a user rather than an alert.
A user reports a wrong answer. How do you work out whether retrieval or generation failed?
Walk three gates in order for that one request — was the supporting passage retrieved, did it survive into the rendered prompt, does the answer contradict it. Each gate blames a different stage, which is why the diagnosis depends on having logged both the retrieved chunk ids and the prompt as sent.
A test fails in CI and all you get is 'expected true, got false'. What should the framework have given you instead?
A failure has to be diagnosable from its artefacts alone, because nobody can attach a debugger to a CI run: that means assertions that report the compared values, a message naming the business expectation, and captured evidence of the state at the moment of failure. Use this automation answer to show the decision, trade-off, and evidence rather than a memorised definition.
Your model scored 0.91 AUC in cross-validation and is barely beating the old rules engine in production. How do you work out why?
Rank the causes by how often they are to blame and test them in that order: target leakage, a validation split that ignored group or time structure, train-serve skew, then genuine distribution shift. One cheap experiment separates most of them, which is rescoring logged production rows offline with the same artefact.