Allow selecting editor debug host and port.
Possibly fixes various editor<->debugger connection related problems.
This commit is contained in:
parent
a1c41be569
commit
98eb58a93c
@ -41,6 +41,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
|
|||||||
List<String> args;
|
List<String> args;
|
||||||
|
|
||||||
String resource_path = GlobalConfig::get_singleton()->get_resource_path();
|
String resource_path = GlobalConfig::get_singleton()->get_resource_path();
|
||||||
|
String remote_host = EditorSettings::get_singleton()->get("network/debug_host");
|
||||||
|
|
||||||
if (resource_path != "") {
|
if (resource_path != "") {
|
||||||
args.push_back("-path");
|
args.push_back("-path");
|
||||||
@ -49,7 +50,7 @@ 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_GET("network/debug/remote_port")));
|
args.push_back(remote_host + ":" + String::num(GLOBAL_GET("network/debug/remote_port")));
|
||||||
}
|
}
|
||||||
|
|
||||||
args.push_back("-epid");
|
args.push_back("-epid");
|
||||||
|
@ -412,8 +412,6 @@ void EditorSettings::setup_network() {
|
|||||||
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
|
for (List<IP_Address>::Element *E = local_ip.front(); E; E = E->next()) {
|
||||||
|
|
||||||
String ip = E->get();
|
String ip = E->get();
|
||||||
if (ip == "127.0.0.1")
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (lip == "")
|
if (lip == "")
|
||||||
lip = ip;
|
lip = ip;
|
||||||
|
@ -588,8 +588,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||||||
ScriptDebuggerRemote *sdr = memnew(ScriptDebuggerRemote);
|
ScriptDebuggerRemote *sdr = memnew(ScriptDebuggerRemote);
|
||||||
uint16_t debug_port = GLOBAL_GET("network/debug/remote_port");
|
uint16_t debug_port = GLOBAL_GET("network/debug/remote_port");
|
||||||
if (debug_host.find(":") != -1) {
|
if (debug_host.find(":") != -1) {
|
||||||
debug_port = debug_host.get_slicec(':', 1).to_int();
|
int sep_pos = debug_host.find_last(":");
|
||||||
debug_host = debug_host.get_slicec(':', 0);
|
debug_port = debug_host.substr(sep_pos + 1, debug_host.length()).to_int();
|
||||||
|
debug_host = debug_host.substr(0, sep_pos);
|
||||||
}
|
}
|
||||||
Error derr = sdr->connect_to_host(debug_host, debug_port);
|
Error derr = sdr->connect_to_host(debug_host, debug_port);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user