JVM Runner (Java / Kotlin / Android)
Build, run and debug Java and Kotlin projects from VS Code, with Android device tools and a Logcat panel.
Projects it handles
| Project |
Detected by |
Build |
Run |
| Android app (Gradle) |
com.android.application module |
assemble<Variant> |
install<Variant> on the selected device, then launches the app and opens Logcat |
| JVM app (Gradle) |
application plugin / Compose desktop |
classes |
run |
| Spring Boot (Gradle / Maven) |
Spring Boot plugin |
classes / compile |
bootRun / spring-boot:run |
| Maven |
pom.xml |
compile |
exec:java with the main class you pick |
| Plain sources (no build tool) |
.java / .kt files |
javac (+ kotlinc) into out/jvm-runner |
java -cp … <main class> |
| Anything else |
— |
custom Gradle task / Maven goals |
same |
The Gradle / Maven wrapper is used when present. Android builds use the JDK bundled with Android Studio unless jvmRunner.javaHome is set.
Where things are
- Status bar (bottom left): project · variant and its backend host · device · Run · Debug · Build · Logcat.
- Editor run button (▷ dropdown, top right of a source file): Build & Run App on Device / Build & Debug App on Device. With no phone connected it starts an emulator.
- Activity bar → JVM Runner: Project (run controls, backend, launch options, database, APK info, crash reports), Devices, Device Files.
- Bottom panel → Logcat.
- Keys:
Shift+F10 run, Shift+F9 debug, Ctrl+F9 build, Ctrl+F2 stop.
Build output
Build output is coloured: errors red, warnings yellow, tasks cyan, up-to-date tasks grey, success green, with a summary line (time, error and warning counts). The colours are the terminal palette of the active colour theme, so they change with the theme. Compiler errors (javac, kotlinc, Maven, AAPT) also land in the Problems panel. Turn colours off with jvmRunner.colorOutput.
Devices
Right-click a device (or use the 🛠 button / Device Actions…):
- Capture: screenshot, screen recording (click the red status bar item to stop).
- App: restart, force-stop, clear data, uninstall, runtime permissions (tick to grant), open database.
- Device settings: dark mode, airplane mode, Wi-Fi, mobile data, animations, show taps, layout bounds, don't keep activities, stay awake, font scale, per-app language.
- Port forwarding: tick ports so
http://localhost:<port> in the app reaches a server on this PC (adb reverse). jvmRunner.reverseOnRun applies ports on every launch.
- Wireless debugging: switch a USB device to Wi-Fi, pair with a pairing code, or connect to an address.
Device Files browses the app's private data folder (debug builds) and shared storage: open, save, upload, delete.
Variant-aware status
For Android variants the status bar and the Project view show the backend the variant is built against, read from literal buildConfigField values (*_URL, *_HOST, …). Fields that look like secrets (KEY, TOKEN, SECRET, PASSWORD) are never shown. A variant with an empty backend URL is highlighted.
Launch options
Launch Options…: start a specific activity instead of the launcher, open a deep link, and pass intent extras (--es key value --ez flag true).
Logcat
Filter: package:mine (the app you last ran) · package:name · tag:Foo · -tag:Noise · level:W · pid:1234 · free text · /regex/.
- ☆ saves the current filter; pick saved ones from the dropdown.
- Fold collapses long stack traces after 6 frames; click "… more frames" to expand.
- Export saves the lines currently shown.
- Stack frames such as
(MainActivity.kt:42) are links to the source file.
Crash catcher
While an Android configuration is selected the device log is watched in the background, even with the Logcat panel closed. When your app crashes you get a notification with Go to Code, and a report (stack trace, build variant, device, last 400 log lines of the process) is saved. Show Crash Reports lists them.
Database inspector
Open App Database copies a database of the app (including Room's -wal file) from the device and shows its tables, with paging and a SQL box. It works on the local copy; Refresh from device pulls again. Needs a debug build on the device and sqlite3 from the SDK platform-tools.
Tests
Run test / Debug links appear above JUnit classes and methods in src/test and src/androidTest. Unit tests run with Gradle or Maven; androidTest classes run on the selected device. A pass / fail summary is shown when the run ends.
Debugging
Debug starts the app waiting for a debugger and attaches automatically (Android: over an adb-forwarded JDWP port; Gradle run / bootRun: --debug-jvm). It drives an installed debug engine: Debugger for Java for .java breakpoints or the JetBrains Kotlin extension for .kt (jvmRunner.debugger; auto follows the active editor). Only one debugger can be attached to a process.
APK info
APK Size & Contents breaks the built APK down by code, native libraries per ABI, resources and assets, and lists the largest files. After each build the status bar shows the APK size and the change since the previous build.
Saved files
Screenshots, recordings, crash reports, exported logs and pulled databases go to ~/jvm-runner (jvmRunner.captureDir). Pulled databases and crash reports can contain real app data.
Not included
Apply Changes / Live Edit, the layout inspector, profilers, code completion, and IntelliJ-native (.iml) builds.