Developing in IntelliJ
Developing PowBot Scripts in IntelliJ IDEA
The PowBot Script Dev plugin turns IntelliJ IDEA into a full development environment for PowBot mobile scripts. Write your script in Kotlin or Java, hit one button, and it compiles, packages, uploads, and runs on a connected device — with live logs and full breakpoint debugging, no manual build steps.
Requirements
- IntelliJ IDEA 2024.2 or newer (Community or Ultimate)
- JDK 17 or newer
- A device or emulator with a debuggable PowBot install, connected over ADB
adbavailable on your machine (the plugin auto-discovers it from$ANDROID_HOME,$ANDROID_SDK_ROOT, or~/.powbot/android)
Installing the plugin
The plugin is distributed from PowBot's own plugin repository (not the JetBrains Marketplace), so you add it as a custom repo once:
- Open Settings → Plugins.
- Click the ⚙ gear icon → Manage Plugin Repositories…
- Click + and paste:
https://storage.powbot.org/v2/intellij-plugin/updatePlugins.xml - Click OK, then switch to the Marketplace tab and search for PowBot Script Dev.
- Click Install, then restart the IDE when prompted.
You'll get update notifications automatically whenever a new version is published to the repository.
Quick start: your first script
- File → New → Project → PowBot Script. The wizard asks for a project name, group/package, and your script's name, author, description, category, and version.
- It scaffolds a ready-to-build Gradle module — the PowBot SDK dependency, a bundled
Gradle wrapper, and a sample class annotated with
@ScriptManifest. - Connect your device (
adb devicesshould list it), then click the green Run ▶ icon in the gutter next to your script class. - The plugin compiles your code, packages it, uploads it to the device, starts it, and streams the bot's logs straight into the IDE console.
Features
- One-click Run / Debug — Run/Debug icons appear in the gutter next to every
@ScriptManifestclass (Kotlin and Java). One click handles compile → package → upload → launch → live log streaming. - Real breakpoint debugging — the Debug action attaches a JDWP debugger to the running bot (handling the ADB port-forwarding for you), so you can set breakpoints, step through, and inspect state in your live script.
- New Project wizard — scaffolds a complete, buildable script project with the SDK wired up and a sample script, so you're running in minutes.
- New Script action — File → New → PowBot Script drops additional
@ScriptManifestclasses into an existing module; one project can hold many scripts. - Multi-device support — when several devices are connected, a picker lets you choose the target; you can also override the device or account per run configuration.
- Live log console — the bot's logs stream into the IDE as the script runs.
- Configurable — a Settings → Tools → PowBot panel exposes the target device, host/port, bot package, account, and timing options.
Settings reference (Settings → Tools → PowBot)
| Setting | What it does | Default |
|---|---|---|
| Device serial | Target device for runs | first connected device |
| Host / gRPC port | Where the bot's upload service listens | 127.0.0.1 / 61666 |
| JDWP port | Debugger attach port | 5005 |
| Bot package | The PowBot app package on the device | pre-filled |
| Account name | Account a script logs in under | (blank) |
(Per-run overrides for device and account are available on each Run/Debug configuration.)
Troubleshooting
- No device in the picker → confirm
adb deviceslists it and the device is authorized. - Run does nothing / upload fails → make sure the PowBot app is installed and running on the device, and that it's the debuggable build.
- Debugger won't attach → another debugger may already be attached, or the JDWP port is in use; check the PowBot settings panel.
- SDK won't resolve → the project pulls
org.powbot:client-sdkfromhttps://repo.powbot.org/releases; make sure that repository is reachable.
Updating
When a new version ships, IntelliJ surfaces it under Settings → Plugins → Installed (because you added the custom repo). Click Update and restart.