浏览代码

Merge pull request #8179 from efornara/2.1

Allow remote debugging on disconnected Windows machines
Rémi Verschelde 8 年之前
父节点
当前提交
fd5215bffb
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      editor/editor_run.cpp

+ 7 - 1
editor/editor_run.cpp

@@ -47,7 +47,13 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
 
 
 	if (true) {
 	if (true) {
 		args.push_back("-rdebug");
 		args.push_back("-rdebug");
-		args.push_back("localhost:" + String::num(GLOBAL_DEF("debug/debug_port", 6007)));
+#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("-epid");
 	args.push_back("-epid");