✅ Flutter SDK installed at: ~/Projects/flutter
✅ ADB installed and available
-
Enable Developer Options on your Android device:
- Go to Settings → About Phone
- Tap Build Number 7 times
-
Enable USB Debugging:
- Go to Settings → Developer Options
- Enable USB Debugging
-
Connect your device via USB cable
-
Accept the USB debugging authorization prompt on your device
-
Verify connection:
adb devices
You should see your device listed.
If your Flutter app is already running on your device, you need to find its process:
# List all running processes and filter for Flutter
adb shell ps | grep flutterOr check for the Dart VM Observatory port:
# Forward the observatory port
adb forward tcp:8080 tcp:8080Method A: Direct Launch
~/Projects/flutter/bin/flutter devtoolsThis will:
- Start DevTools server
- Open your browser to
http://localhost:9100 - Show you a connection screen
Method B: Connect to Running App
If your app is already running in debug mode, it should print an Observatory URL in the console like:
An Observatory debugger and profiler is available at: http://127.0.0.1:xxxxx/
Copy that URL and paste it into DevTools.
# Check logcat for the Observatory URL
adb logcat | grep -i observatoryOr:
# List all forwarded ports
adb forward --listOnce connected to DevTools, you can:
- Widget Inspector: View the widget tree, inspect properties, and debug layout issues
- Performance: Profile your app's performance
- Network: Monitor network requests
- Logging: View console logs
- Debugger: Set breakpoints and step through code (if you have the source)
# Restart ADB server
adb kill-server
adb start-server
adb devicesYour app must be built with debug mode enabled. Check that the app was built with:
flutter run --debug(if you built it yourself)- Or has
debuggable truein the Android manifest
# Forward a specific port
adb forward tcp:9100 tcp:9100# Check Flutter version
~/Projects/flutter/bin/flutter --version
# Check connected devices
adb devices
# Launch DevTools
~/Projects/flutter/bin/flutter devtools
# View app logs
adb logcat
# Filter logs for Flutter
adb logcat | grep flutterTo use flutter command without the full path, add this to your ~/.zshrc:
export PATH="$PATH:$HOME/Projects/flutter/bin"Then run:
source ~/.zshrcAfter this, you can just use flutter instead of ~/Projects/flutter/bin/flutter.