Skip to content

Android Remote Debug & Scene Sync not working: Update editor_export.cpp

Sadeep Weerasinghe requested to merge github/fork/sadeepdarshana/master into master

Godot version: 3.1.1 OS/device including version: Ubuntu 18.04 Laptop(development) Android 7.0 Huawei GR5 (running the app) Issue description: Remote debug and scene sync do not work. The service tries to connect to 'localhost' (which is the phone itself when it should connect to my laptop instead). I have set Editor Settings -> Network -> Debug -> Remote Host to 192.168.8.115 which is my laptop IP. But when deploying for android over Wifi Adb the debug & sync service chooses "localhost" as Remote Host instead of 192.168.8.115. Since this service runs on the app the localhost becomes the phone instead of the laptop.

I installed a TCP listener app on my phone and listened to localhost:{Remote Port}. I got requests from the app to phone itself's remote port.

Reason: editor/editor_export.cpp:EditorExportPlatform::gen_export_flags() method contains this line.

if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST) host = "localhost";

This makes the method return "localhost" instead of the IP I chose ("192.168.8.115") as the Remote Host. This PR deletes the buggy line. Someone who knows the purpose of this line just delete it or handle it properly.

Merge request reports

Loading