Debugging
104 bites tagged Debugging — interview questions with model answers, and 60-second explainers.
Your feature launches but engagement doesn't move. What's engineering's role in diagnosis?
Validate data, segment users, test tech and behavioral hypotheses, propose experiments. If engineering owns metric diagnosis or deflects to product. Blaming users without checking instrumentation first.
User session length dropped 15%: what technical issues and data to check?
Tests structured incident response. Outline: check exposure traffic, deployments, platform splits, and instrumentation bugs like dupes or bots. Red flag: blaming users before ruling out data quality or deployment changes.
What technical steps would you take to investigate a user's workflow frustration?
Tests if you can turn qualitative user pain into structured technical investigation. Strong answer: reproduce the exact workflow, then inspect logs and traces for errors or latency spikes, and segment by the user's environment.
Operational vs Programmer Errors in Node
Operational errors are expected problems like a failed network request; programmer errors are bugs like reading undefined. Handle the first gracefully, crash the second. The footgun is catching programmer errors and continuing, which corrupts process state.
Debug sudden model degradation using experiment tracking and model registry
Tests unified use of experiment tracking and registry lineage. Great answers verify the exact production artifact, inspect linked training data and hyperparameters, compare input distributions, and check dependency metadata.
Why does your RAG ignore or contradict retrieved context?
Tests separation of retrieval failures from generation grounding in RAG. Strong answers trace symptoms to root causes like bad chunks, prompt ordering, or parametric knowledge override, then outline systematic debugging. Do not just say hallucination.
What causes sudden loss spikes in long pre-training runs?
Name gradient explosions, LR mismatch, FP16 overflow, and poison batches; propose norm checks, rollback, and LR cuts. Diagnosing LLM training instabilities under pressure.
How would you use Energy Log to investigate battery drain?
Tests correlating Instruments energy metrics to app behavior. Strong answers profile with Energy Log, map CPU/Location/Network spikes to user flows or background work, and validate fixes with before/after logs. Red flag: blaming the OS without evidence.
Explain symbolic breakpoints and debug Auto Layout with one
Tests debugging closed-source frameworks without source lines. A strong answer says a symbolic breakpoint stops on UIViewAlertForUnsatisfiableConstraints, then checks the backtrace or log to find the bad view.
What LLDB command prints a UIView description versus an Int?
Tests LLDB formatting at breakpoints. Great answers: po invokes description or debugDescription on objects, while p evaluates and prints raw primitive values with type info. Red flag: mixing them up or recommending console print instead of LLDB.
Thread Sanitizer catches data races in Swift
Thread Sanitizer turns flaky race crashes into reproducible reports by monitoring memory accesses at runtime. Use it in Xcode to catch unsynchronized cross-thread reads and writes. It only catches races that execute during your test run, so coverage matters.
Profiling iOS Memory with Instruments
Instruments X-rays your heap to catch objects that outstay their welcome. Profile image-heavy features or when jetsam kills your app. Never trust Simulator memory numbers; always validate on physical hardware.
What causes client order_completed events to diverge from backend records?
Tests end-to-end event reliability. Separate client failures (network, ad blockers, duplicates) from backend gaps (idempotency, validation, races) and propose timestamped join analysis. Red flag: blaming users or fixing before measuring gap direction.
How do you instrument client and server to debug payment drop-offs?
Tests designing telemetry that distinguishes intent from errors across the stack. Strong answers use visibility pings for abandonment, validation events for client errors, and gateway status codes for backend failures.
go vet: Catch Bugs Compilers Allow
go vet catches suspicious constructs the compiler ignores, like Printf argument mismatches. Run it in CI to spot concurrency and formatting bugs early. It relies on heuristics, so a clean report does not guarantee correctness and false positives can occur.
Your build times increased significantly. How do you investigate and optimize?
Tests methodical CI/CD bottleneck analysis and build optimization tactics. Strong answers baseline the timeline, isolate the slowest stage with metrics, then apply parallelism, caching, or dependency pruning.
How would you use Perfetto and Trace.beginSection to find a non-obvious bottleneck?
Tests correlation beyond CPU sampling. Covers coarse Trace.beginSection to limit 1-10us overhead, recording app ATrace with CPU/scheduling tracks, and correlating slices against scheduler latency. Red flag: omitting overhead or ignoring Perfetto SQL queries.
What is ADB? Describe two common commands and what they accomplish.
This tests command-line debugging fluency. Define ADB as a client-server bridge, then give two commands such as adb install for APK deployment and adb logcat for streaming device logs. Red flag: calling it the Android Studio debugger or omitting the daemon.
Which Android Studio tool inspects view hierarchy and what does it show?
Tests practical knowledge of runtime UI debugging tools. A strong answer names Layout Inspector, cites live view hierarchy with bounds and attributes, and distinguishes it from the static Layout Editor. Red flag: citing Logcat or the preview pane instead.
App crash: debug with Logcat and breakpoints in Android Studio
This tests systematic debugging and Android Studio fluency. A strong answer reproduces the crash, filters Logcat for the fatal exception, sets a breakpoint on the offending frame, and inspects variables.
Average latency up 50ms but p99 flat: diagnose the discrepancy
Tests if you know mean reflects full distribution while p99 is a threshold. Strong answers hypothesize body shift like cache misses or traffic mix changes, and demand histograms and segmentation by endpoint. Red flag: blaming outliers, which would raise p99.
What user segments do you check first after a 10% DAU drop?
Validate by time, platform, and geography; then slice by new vs returning, channel, and feature usage to isolate the bleeding cohort. Structured triage of a metric drop through user segmentation.
Conversion metric dropped suddenly with no recent deployments; debug instrumentation causes
Distinguishing real regressions from telemetry pipeline failures. Segment by device, channel, and geography to spot uniform loss signaling a tagging break; verify vendor delays and sampling; check for consent or ad-blocker shifts.
How do you diagnose a memory leak using the Android Studio Profiler?
This tests your practical skill with the Android Memory Profiler, not just theory. A great answer involves capturing a heap dump, filtering for unreachable objects, and inspecting the reference tree to find the leak's source.
Get Debugging bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.