InterviewStack.io LogoInterviewStack.io

Debugging and Systematic Troubleshooting Questions

Diagnosing defects methodically: reproducing failures, forming and testing hypotheses, reading stack traces and logs, bisecting changes, and reasoning about error handling and edge cases. Covers a disciplined root-cause approach that applies from local bugs to production issues, distinct from embedded hardware-level debugging. A universally probed engineering-craft skill.

HardTechnical
28 practiced

Explain, with examples, how cognitive biases such as confirmation bias, anchoring, and sunk-cost fallacy can hinder a debugging investigation. Describe concrete practices, such as pair debugging, rotating investigators, hypothesis logs, and clear acceptance criteria, that you have introduced on a team to mitigate these biases.

MediumTechnical
42 practiced

A C++ function that paginates a vector exhibits a missing last item under certain page sizes. Identify the off-by-one bug and provide corrected code, considering bounds checks and zero-based page numbering:

cpp
vector<int> get_page(const vector<int>& items, int page, int page_size) {
  int start = page * page_size;
  int end = start + page_size;
  vector<int> out;
  for (int i = start; i < end; ++i) {
    out.push_back(items[i]);
  }
  return out;
}
HardTechnical
28 practiced

A recent performance patch reduced average latency but increased p99 latency. How would you investigate and resolve this regression while preserving the average-case gains? Describe your analysis steps and the kinds of code or system fixes you might apply.

EasyTechnical
25 practiced

You're handed a stack trace and a short log snippet showing a NullPointerException-like error in a microservice. What are the first five concrete steps you take to triage the issue, and why? Be specific about the commands, artifacts, or data points you would request or inspect.

EasyBehavioral
26 practiced

Tell the story of a concrete bug or production failure you found. Explain how you detected it, how you reproduced it if that was possible, the debugging tools and techniques you used, the root cause, and the permanent fix you implemented.

Unlock Full Question Bank

Get access to all 40 Debugging and Systematic Troubleshooting interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.