1.6 KiB
Client
- Build dev version (will include source maps):
npm run dist:dev
- Run from
distdirectory:
npm run start
- Use the browser's built-in developer tools or your favorite IDE.
Node.js server
npm run dist:devcd distnode --inspect-brk ./index.js
HINT: you might want to set DEBUG environment variable (see debug):
DEBUG=* node --inspect-brk ./index.js
Android server (scrcpy-server.jar)
Source code is available here HINT: you might want to build a dev version.
To debug the server:
- start node server
- kill server from UI (click button with cross and PID number).
- upload server package to a device:
adb push server/build/outputs/apk/debug/server-debug.apk /data/local/tmp/scrcpy-server.jar
- setup port forwarding:
adb forward tcp:5005 tcp:5005
- connect to device with adb shell:
adb shell
6.1. for Android 8 and below run this in adb shell (single line):
CLASSPATH=/data/local/tmp/scrcpy-server.jar app_process -agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=5005 / com.genymobile.scrcpy.Server 1.17-ws5 DEBUG web 8886
6.2. for Android 9 and above:
CLASSPATH=/data/local/tmp/scrcpy-server.jar app_process -XjdwpProvider:internal -XjdwpOptions:transport=dt_socket,suspend=y,server=y,address=5005 / com.genymobile.scrcpy.Server 1.17-ws5 web DEBUG 8886
- Open project (scrcpy, not ws-scrcpy) in Android Studio, create
RemoteDebug configuration with:
Host: localhost, Port: 5005
Connect the debugger to the remote server on the device.