Scrcpy for VS Code

Display and control your Android device screen directly within VS Code, similar to Android Studio's "Running Devices" feature.
Features
- Multi-device support - Tab bar for switching between devices
- Touch & scroll - Tap, drag, and mouse wheel scrolling
- Keyboard input - Click canvas to type, with modifier support (Ctrl, Alt, Shift)
- Audio streaming - Hear device audio with mute control
- Clipboard sync - Ctrl+V to paste, Ctrl+C to copy
- Device controls - Volume, Back, Home, Recent Apps, Power, Rotate (long press supported)
- WiFi connection - Android 11+ Wireless Debugging or legacy
adb tcpip
- Auto-connect/reconnect - Automatically handles device connections
- APK install & file upload - Via toolbar buttons
- Hardware-accelerated decoding - WebCodecs API for smooth playback
Advanced Features
Prerequisites
1. Install ADB and scrcpy
| Platform |
Command |
| macOS |
brew install scrcpy android-platform-tools |
| Linux |
sudo apt install scrcpy adb |
| Windows |
winget install --exact Genymobile.scrcpy (includes ADB) |
2. Enable USB Debugging
- Enable Developer Options: Settings > About Phone > Tap "Build number" 7 times
- Enable USB Debugging: Settings > Developer Options > USB Debugging
Usage
- Connect your Android device via USB
- Verify with
adb devices
- Click the scrcpy icon in the Activity Bar
- Tip: Drag the view to the Secondary Sidebar (right side)
Multi-Device
- + button to add devices
- Click tabs to switch (only active tab streams)
- × to disconnect
WiFi Connection
Android 11+: Settings > Developer Options > Wireless debugging > Pair device with pairing code
Legacy: adb tcpip 5555, then connect via IP
Commands
| Command |
Description |
Scrcpy: Start Device Mirroring |
Focus view and connect |
Scrcpy: Stop Device Mirroring |
Disconnect |
Scrcpy: Connect to Device over WiFi |
Wireless connection |
Scrcpy: Install APK |
Install APK on device |
Scrcpy: Upload Files to Device |
Upload to /sdcard/Download/ |
Settings
Access via the gear icon in the scrcpy view toolbar.
| Setting |
Default |
Description |
scrcpy.path |
(empty) |
Path to scrcpy directory |
scrcpy.adbPath |
(empty) |
Path to ADB directory |
scrcpy.maxSize |
1920 |
Max screen dimension (px) |
scrcpy.bitRate |
8 |
Video bitrate (Mbps) |
scrcpy.maxFps |
60 |
Max FPS |
scrcpy.audio |
true |
Enable audio streaming |
scrcpy.screenOff |
false |
Turn device screen off |
scrcpy.autoConnect |
true |
Auto-connect on plug in |
scrcpy.autoReconnect |
true |
Auto-reconnect on disconnect |
See all settings in VS Code: Preferences: Open Settings > search "scrcpy"
Troubleshooting
See Troubleshooting Guide for common issues.
Requirements
- VS Code 1.85.0+
- ADB installed
- scrcpy installed
License
Apache-2.0
Credits
| |