adb Debugging using the doc does not work for me (original) (raw)

Environment

Describe the bug

When I try to run scrcpy in debugging mode, I get the following output, without giving me the opportunity attach the debugger:

./run build -s xxxxxxxxxxxxxx
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  xxxxxxxxxxxxxx                  device  Pixel_6a
DEBUG: Device serial: xxxxxxxxxxxxxx
DEBUG: Using SCRCPY_SERVER_PATH: build/server/scrcpy-server
build/server/scrcpy-server: 1 file pushed, 0 skipped. 139.8 MB/s (170166 bytes in 0.001s)
INFO: Server debugger waiting for a client on device port 5005...
DEBUG: Interrupting socket
DEBUG: Server disconnected
DEBUG: Server terminated
ERROR: Server connection failed

Am I doing something wrong here?