Debroid ๐คโก
The Headless Android Debugger for AI Agents
**Debroid** (*DEBug + AnDROID*) is a headless CLI that speaks the Java Debug Wire protocol (JDWP) so AI agents โ Claude Code, Grok Build, Codex, OpenCode, Cursor, Antigravity, or anything with a terminal โ can debug a live Android app the way a human would in Android Studio: set breakpoints, catch exceptions, step through code, inspect and mutate variables, and watch fields โ all without a GUI, and all through strict, machine-parseable JSON.
## โ Why it exists
Traditional Android development environments are highly visual. While AI coding assistants can write code, they are effectively "blind" when it comes to runtime debugging because they cannot click through the Android Studio UI to inspect memory or pause execution.
**Debroid closes this gap.** It acts as a translation layer between the raw terminal (which AI agents are great at using) and the Android Virtual Machine. By providing a CLI that outputs deterministic JSON, an AI agent can autonomously hypothesize a bug, launch the app, trap the exact line of code, read the live state of the device, and evaluate a fix โ granting agents the same deep runtime awareness previously reserved for human developers.
## โจ Features
- **๐ด Breakpoints**: Set line breakpoints in any class. Debroid automatically defers them if the class isn't loaded yet.
- **โก Exception Traps**: Catch caught or uncaught exceptions globally across the app.
- **๐ Watchpoints**: Monitor field access and modification live.
- **๐ฌ Deep Inspection**: Recursively inspect deep object memory, local variables, and call frames with built-in cycle-guards.
- **๐งฌ Live Mutation**: Modify variable memory dynamically on paused threads using `set-var`.
- **๐งฎ Live Evaluation**: Fully-featured expression evaluator supporting Java syntax, method calls, and arithmetic directly in the target VM.
- **๐พ Stepping**: Step Over, Step Into, Step Out, or Resume at will.
- **๐งต Coroutine Aware**: Built-in mechanism to extract shallow locals from Kotlin Continuation frames.
## ๐ Installation
> [!TIP]
> **Let your AI Agent do it for you!** Copy & paste this prompt directly to your AI agent:
> ```text
> Read https://raw.githubusercontent.com/PatilShreyas/debroid/main/README.md and install the Debroid CLI and its skill globally for me.
> ```
### Prerequisites
* Java JDK 11+ (`JAVA_HOME`)
* Android SDK & `adb` configured in your `PATH`
### Install the CLI
**Option 1: Quick Install (Pre-built Release Binary)**
Run the one-liner script to download the latest release binary and install it:
```bash
curl -fsSL https://raw.githubusercontent.com/PatilShreyas/debroid/main/install.sh | bash
```
**Option 2: Local Build Install (Build from Source)**
Clone the repository and build locally:
```bash
./install.sh
```