{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "patilshreyas-debroid--trap-crash-with-live-state",
 "repo": "PatilShreyas/debroid",
 "repo_url": "https://github.com/PatilShreyas/debroid",
 "repo_slug": "patilshreyas-debroid",
 "title": "Catch an app crash and read live state at the throw",
 "page_title": "How to catch an app crash and read live state at the throw with Debroid",
 "summary": "Set exception traps, reproduce the crash, and read locals and frames without a GUI.",
 "who": "An Android developer or AI agent handed a crash report with no clear cause, who needs the exact runtime values when the exception fires.",
 "problem": "Stack traces show where an exception landed but not the variable values that caused it, and reproducing the crash by hand in Android Studio is slow for an agent.",
 "outcome": "The agent gets a JSON record of the caught or uncaught exception, the frames, and the local values at that moment, and can propose a fix based on them.",
 "steps": [
  "Install the CLI with `curl -fsSL https://raw.githubusercontent.com/PatilShreyas/debroid/main/install.sh | bash`",
  "Start the app suspended with `debroid launch`, or attach to a running app with `debroid attach`",
  "Set an exception trap with `debroid catch-exception` (uncaught only by default; add `--caught` if needed)",
  "Trigger the bug in the app, then read events with `debroid poll --with-stacktrace` (inferred, check the README)",
  "Read the paused state with `debroid pause-state --pretty` and then `debroid resume` (inferred, check the README)"
 ],
 "agent_prompt": "Use the Debroid CLI on the Android app <package-name>. Set an uncaught exception trap, trigger the crash path <steps-to-reproduce>, and run `debroid poll --with-stacktrace` followed by `debroid pause-state`. Return the exception class, the frame where it was thrown, and the local values at that point as JSON. Verify that the exception class matches the crash in the bug report before proposing a fix.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Debroid needs JDK 11+ and adb set up before the first command, and the daemon listens on localhost without authentication, so run it only on a machine where every local user is trusted.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "kotlin",
 "requirements": [
  "Java JDK 11+ with JAVA_HOME set",
  "Android SDK with adb in your PATH",
  "An Android app you can build and run, with debugging enabled",
  "A terminal where an AI agent can run commands"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "reverse-engineering",
   "notice": "Live JVM inspection can read memory of any app attached to the debugger, so only attach to apps you are authorized to debug."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/patilshreyas-debroid/trap-crash-with-live-state/",
 "md": "https://dedupedai.com/use-cases/patilshreyas-debroid/trap-crash-with-live-state/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/patilshreyas-debroid--trap-crash-with-live-state.json",
 "api_version": "v1"
}
