Gather evidence before guessing: exact errors, stack traces, timestamps, affected users and correlation ids from structured logs and traces. Then list what differs between production and local: data, configuration, load and concurrency, infrastructure, versions, culture and time zone settings. Form a hypothesis, test it in staging with production like data, add targeted logging behind a flag if needed, and fix it with a test that reproduces the cause.
Why interviewers ask this
Production only bugs are a reality of the job, and the interviewer wants a disciplined approach rather than random changes deployed in hope. They listen for evidence gathering through good logging, a systematic comparison of environmental differences, and safe ways to gather more information. Naming data shape, configuration and concurrency as the usual suspects, and finishing with a regression test, shows you have chased these down before.
How to structure your answer
- Gather evidence from logs, traces and the people affected.
- List the differences between production and local.
- Test hypotheses safely, adding targeted logging if needed.
- Fix with a regression test and improve observability.
Example answer
I start with evidence rather than theories. I pull the exception and stack trace, use the correlation id to follow the whole request across services, and note when it happens and who it affects. Patterns matter: one customer, certain times of day, after a deployment, or only under load. Then I list what differs from my machine. Data is the big one, because production has records with nulls, odd characters or sizes that test data never has. Then configuration, concurrency and load, infrastructure like proxies, and culture and time zone settings. On one service, invoice imports failed only for some suppliers, and the logs showed a parsing exception. The servers had a different culture setting from our laptops, so decimal values in those suppliers' files parsed differently. Once we knew that, a unit test that set the same culture reproduced it in seconds, and the fix was parsing with the invariant culture. Had the evidence not been enough, I would have added targeted logging behind a flag rather than guessing.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- What would you log to make problems like this easier next time?
- How would you debug in production without exposing customer data?
- When would you roll back rather than keep investigating?
Related .net developer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions