Debugging
104 bites tagged Debugging — interview questions with model answers, and 60-second explainers.
What is ADB and what are two common commands you use?
Tests your hands-on familiarity with the core Android toolchain. Define ADB's client-server architecture, then explain `adb install` for APKs and `adb logcat` for logs. A red flag is being unable to name specific commands or only knowing IDE buttons.
Which tool inspects the view hierarchy to debug layouts?
This tests your knowledge of core Android Studio debugging tools. A great answer names the Layout Inspector, describes its 3D component tree and attributes pane, and notes its live update capability on API 29+. A red flag is only mentioning XML files.
How would you debug an app crash in Android Studio?
This tests your systematic debugging process. A good answer starts with Logcat to find the stack trace, then uses breakpoints to inspect program state *before* the crash occurs. A red flag is randomly adding print statements instead of using the debugger.
Why do our analytics and backend user counts not match?
This tests your ability to systematically debug data integrity issues. A great answer first defines the metric, then investigates tracking implementation, privacy blockers, and time zone settings. A red flag is blaming one tool without a structured plan.
Average latency is up 50ms, but p99 is flat. How do you diagnose this?
Tests your grasp of latency metrics. A rising average with flat p99 means the *bulk* of requests (p50-p90) slowed, not the tail. Hypothesize a common bottleneck and segment data by endpoint/user to find it. Red flag: blaming new, slow outliers.
DAU dropped 10%. How do you investigate?
Tests structured problem diagnosis. First, verify the data isn't corrupt. Then, segment the drop by user type (new vs. returning), platform (iOS/Android/Web), and geography to isolate the 'what' before hypothesizing the 'why'.
How do you debug a data quality issue in a complex pipeline?
Tests systematic debugging in distributed systems. A great answer prioritizes containment, traces data lineage from report to source, and proposes specific observability tools.
Diagnosing Out-of-Memory Errors in a Spark Job
This tests your systematic debugging of distributed systems. A great answer first diagnoses the failure location via the Spark UI, then investigates data skew and code inefficiencies, and finally tunes memory configs.
Sudden metric drop, no recent deployments. What's the cause?
This tests your ability to debug data discrepancies beyond code, focusing on the analytics pipeline. First, distinguish data loss from misattribution. Then, check processing delays and hidden data sources. A red flag is not segmenting data first.
How do you diagnose a memory leak with Android Studio Profiler?
This tests your systematic process for debugging memory issues. A good answer outlines using the Memory Profiler, forcing GC, capturing heap dumps, and analyzing object references. A red flag is just naming the tool without explaining the 'how'.
What is the Android Debug Bridge (ADB)?
This tests practical command-line proficiency and understanding of the host-device link. A good answer defines the client-server-daemon architecture and gives two commands like `adb install` and `adb logcat`.
How do you debug a running app's view hierarchy?
Tests practical debugging skills. A good answer names the Layout Inspector, describes the component tree and attributes panes, and explains how the 3D view finds hidden elements. A red flag is only naming the tool without explaining its use.
How do you debug an app crash in Android Studio?
Tests your systematic problem-solving process. A great answer outlines reproducing the crash, analyzing the Logcat stack trace for the FATAL EXCEPTION, and then using strategic breakpoints and the variable inspector to find the root cause of the bad state.
Deobfuscating Android Crash Stack Traces
Obfuscated crash reports are useless. Deobfuscation uses a mapping file from your build to translate stack traces back into readable code. This is vital for debugging production apps using R8/ProGuard or native C++.
A key metric dropped 15%. How do you investigate?
This tests systematic debugging of business metrics. A great answer first validates the data itself, then checks for recent changes (deploys, features), and finally segments the drop to isolate the cause. A red flag is immediately assuming a product bug.
Why don't analytics and backend user counts match?
This tests your systematic debugging and understanding that 'user' has different definitions. A good answer first defines 'user' in each system, then investigates tracking implementation, timing differences, and filtering.
Average latency is up, but p99 is flat. Why?
This tests your grasp of latency distributions. Hypothesize that a large group of typical requests slowed, pulling up the average but not crossing the p99 threshold. Segment by endpoint or customer to find the cohort.
DAU dropped 10%. What user segments do you investigate first?
Tests your systematic problem-solving. First, clarify the metric and timeline. Then, segment by platform, geography, and user tenure (new vs. returning). A red flag is jumping to external causes before ruling out internal issues like a bad deployment.
How would you debug a critical data quality issue in a pipeline?
Tests your systematic debugging of a distributed system under pressure. A great answer contains the impact, traces data lineage backward from the report to the source, and then proposes preventative tooling.
How do you debug out-of-memory errors in a Spark job?
Tests your systematic debugging of distributed systems. A great answer diagnoses via the Spark UI, investigates data skew and inefficient code (e.g., shuffles), and only then tunes memory or partition configs. Red flag: immediately increasing executor memory.
How would you debug a sudden drop in a key metric?
Tests your systematic debugging of complex data systems. First, validate the drop against a source of truth and segment the data. Then, hypothesize causes like misattribution or data loss.
Svelte's `{@html}` and `{@debug}`: When to Use Them
Svelte's `{@html}` and `{@debug}` offer powerful but risky escapes. `{@html}` renders raw HTML strings, while `{@debug}` acts like a `debugger` statement in your markup. Use them for trusted content and dev-time inspection.
React DevTools Profiler: Find Performance Bottlenecks
The React Profiler records how long components take to render, helping you find performance bottlenecks. Use it to diagnose slow interactions and see which components re-render too often.
useDebugValue: Label Your Custom Hooks in DevTools
useDebugValue attaches a readable label to your custom hooks in React DevTools. Instead of just seeing raw state, you can display a meaningful string like "Online". The footgun is overusing it; reserve it for complex, shared library hooks.
Get Debugging bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.