Allow selecting editor debug host and port.

Possibly fixes various editor<->debugger connection related problems.

(cherry picked from commit 98eb58a93c)
This commit is contained in:
Fabio Alessandrelli
2017-05-08 22:22:28 +02:00
parent baa175d7f8
commit 7a4dc3be41
3 changed files with 5 additions and 11 deletions

View File

@@ -40,6 +40,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
List<String> args;
String resource_path = Globals::get_singleton()->get_resource_path();
String remote_host = EditorSettings::get_singleton()->get("network/debug_host");
if (resource_path != "") {
args.push_back("-path");
@@ -48,13 +49,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
if (true) {
args.push_back("-rdebug");
#ifdef WINDOWS_ENABLED
// Avoid failing DNS lookup on disconnected Windows machines.
const char *debug_host = "127.0.0.1:";
#else
const char *debug_host = "localhost:";
#endif
args.push_back(debug_host + String::num(GLOBAL_DEF("debug/debug_port", 6007)));
args.push_back(remote_host + ":" + String::num(GLOBAL_DEF("debug/debug_port", 6007)));
}
args.push_back("-epid");