I've been trying to setup ADB remote debugging for Qt.
Scenario:
- Remote development server with QT
- Local laptop with connected phone
Solution:
I tunnel all the traffic on port 5037 (default adb port) through a Remote Port Forwarding SSH session. Works Fine.
The commands I execute:
# Kill old adb server.
devhost$ adb kill-server
# Activate adb server on client
laptop$ adb start-server
# Start ssh tunnel. Hide/minimize this window not to close it by accident
laptop$ ssh -XC -R 5037:localhost:5037 <your devhost machine>
QT on dev. server detects the mobile, attempts to the deploy.
The app gets deployed. The result FEELS GOOD. ~~With dev server in another country. It's optic fiber all the way from server right to my desk... But not so fast...
When all of the sudden QT shouts about being unable to connect with localhost:5039
5039? What is it needed for? I tried tunelling 5039 but I'm basically in a blind-spot. The error is gone but the app is stuck at waiting for debugger and no further messages from QT no errors.
Nothing. It just hangs indefinitely.
On the mobile there's the standard waiting for debugger msg at the bottom. (Note: the app got deployed by qt and launched).
Ideas?
The only informative message within log is:
W ActivityThread: Application org.qtproject.APPNAME is waiting for the debugger on port 8100...
8100? now what is that? Is that supposed to be taken care of by ADB/QT or what
I can see all the logcat events on dev-server while the app on mobile 'keeps waiting' ..browser entire logcat log. the only sensible message regarding debugging is that the app keeps waiting on and on.
Local debugging of same app through USB works FINE.
The remote server is able to compile deplay and launch the app on mobile phone, however dubugging is an exercise in futility due to the described behaviour.
I have noticed that during debugging attempts, adb on local laptop keeps opening new ports and listening on these. what the heck is going on here?
On the contrary, when debugging over USB, 5037 is the only port used everything works and adb does not go into the new-port-creation frenzy.
question from:
https://stackoverflow.com/questions/65869585/qt-android-remote-debugging 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…