flutter / flutter/flutter-intellij
Embedded DevTools shows "No client connection" — VM Service URI not passed automatically to embedded DevTools panel
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
# Embedded DevTools shows "No client connection" — VM Service URI not passed automatically
## Environment
- **Android Studio**: Panda 2025.3.2
- **Flutter**: 3.38.7 (stable channel, via FVM)
- **Dart**: (bundled with Flutter 3.38.7)
- **DevTools**: 2.51.1
- **OS**: macOS 26.4 (darwin-arm64)
- **Device**: Android Emulator
- **flutter doctor -v**: All checks pass, no issues found
## Steps to Reproduce
1. Create a new Flutter project (also reproducible on existing projects)
2. Run the app in **Debug mode** from Android Studio (click the bug icon)
3. Wait for the app to fully launch on the emulator
4. Open DevTools from the **Debug tab toolbar** (not from Find Action or top menu)
## Expected Behavior
Embedded DevTools should automatically connect to the running app's VM Service and show live data in all tabs (Widget Inspector, Performance, Network, CPU Profiler, Memory, etc.).
## Actual Behavior
- DevTools opens inside Android Studio but the bottom status bar shows **"No client connection"**
- All tool tabs (Performance, Network, CPU Profiler, Memory) show no data
- **Widget Inspector** in Android Studio appears **greyed out / disabled**
- There is **no "Connect to a running app"** input field visible in the embedded DevTools panel — it jumps straight to a tool tab (e.g., Performance) as if it expects to already be connected
- The DTD (Dart Tooling Daemon) connection appears to succeed, but the VM Service connection does not
## Diagnostic Evidence
### VM Service starts correctly
The Run tab output confirms the VM Service is available:
```
VM Service URL on device: http://127.0.0.1:44617/xxxxx=/
Forwarded host port 52048 to device port 44617 for VM Service
Successfully connected to service protocol: http://127.0.0.1:52048/xxxxx=/
Debug service listening on ws://127.0.0.1:52053/xxxxx=/ws
```
### DevTools works perfectly when launched manually
Running DevTools from terminal with the VM Service URI connects successfully with **all tabs working**:
```bash
dart devtools --vm-uri=http://127.0.0.1:52048/xxxxx=/
```
This confirms:
- ✅ Flutter SDK is correct
- ✅ DevTools 2.51.1 works
- ✅ VM Service is accessible
- ❌ Android Studio's Flutter plugin is **not forwarding the VM Service URI** to embedded DevTools
### FVM configuration is correct
- Android Studio's **Settings → Languages & Frameworks → Flutter → Flutter SDK path** points to the correct FVM-managed SDK
- `.fvm/fvm_config.json` and `.fvm/flutter_sdk` symlink are both correct
## Analysis
The issue appears to be in the Flutter IntelliJ plugin's handoff between the running app's VM Service / DDS (Dart Developer Service) and the embedded DevTools panel. The plugin launches DevTools but does not pass the VM Service URI, leaving DevTools in a disconnected state with no way for the user to manually connect (no input field is shown).
This may be related to DDS using a dynamically assigned port (`http://127.0.0.1:0`), which the plugin fails to capture and forward.
## Workaround
After launching the app in debug mode, manually run DevTools from the terminal:
```bash
dart devtools --vm-uri=http://127.0.0.1:/=/
```
Copy the VM Service URL from the Run tab output each time (it changes per session).
## Related Issues
- #8583 — "Open Flutter DevTools in browser" command does not open DevTools with VM service connection (similar symptom, different entry point)
Contributor guide
Assessment
This issue has not been assessed yet.