Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
110.68k stars 10.61k forks source link

Not able to debug the server #3295

Open Yan-CR opened 2 years ago

Yan-CR commented 2 years ago

I manually change the build_without_gradle.sh file, turn SCRCPY_DEBUG to true, image and run it, successfully get scrcpy-server. I am not using meson, does it matter? image

Then I replace the scrcpy-server in the scrcpy-win64-v1.24.zip, and run scrcpy-console.bat, and execute adb forward tcp:5005 tcp:5005

Then, in Android Studio, new remote debug conf(no Remote type as DEVELOP.md instructed), and click debug, it says Unable to open debugger port (localhost:5005): java.io.IOException "handshake failed - connection prematurally closed" If i change attach to remote JVM to listen to remote JVM, it says Unable to open debugger port (localhost:5005): java.net.BindException "Address already in use: NET_Bind"

Any step wrong with me?

image

rom1v commented 2 years ago

It seems that since Android 11, the documented steps to debug do not work anymore: #2722