mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Fix network/debug/remote_port
editor setting not working properly
This commit is contained in:
parent
fc1368bee0
commit
b76275ab12
@ -211,6 +211,7 @@ EditorExportPreset::EditorExportPreset() {
|
||||
void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) {
|
||||
|
||||
String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
|
||||
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
|
||||
|
||||
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
|
||||
host = "localhost";
|
||||
@ -230,7 +231,7 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
|
||||
|
||||
r_flags.push_back("-rdebug");
|
||||
|
||||
r_flags.push_back(host + ":" + String::num(GLOBAL_DEF("network/debug/remote_port", 6007)));
|
||||
r_flags.push_back(host + ":" + String::num(remote_port));
|
||||
|
||||
List<String> breakpoints;
|
||||
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
|
||||
@ -621,6 +622,7 @@ Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, co
|
||||
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
|
||||
|
||||
String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
|
||||
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
|
||||
|
||||
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST)
|
||||
host = "localhost";
|
||||
@ -640,7 +642,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
|
||||
|
||||
r_flags.push_back("-rdebug");
|
||||
|
||||
r_flags.push_back(host + ":" + String::num(GLOBAL_DEF("network/debug/remote_port", 6007)));
|
||||
r_flags.push_back(host + ":" + String::num(remote_port));
|
||||
|
||||
List<String> breakpoints;
|
||||
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
|
||||
@ -2109,6 +2111,7 @@ static int _get_pad(int p_alignment, int p_n) {
|
||||
void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
|
||||
|
||||
String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
|
||||
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
|
||||
|
||||
if (p_flags&EXPORT_REMOTE_DEBUG_LOCALHOST)
|
||||
host="localhost";
|
||||
@ -2128,7 +2131,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
|
||||
|
||||
r_flags.push_back("-rdebug");
|
||||
|
||||
r_flags.push_back(host+":"+String::num(GLOBAL_DEF("network/debug/remote_port", 6007)));
|
||||
r_flags.push_back(host+":"+String::num(remote_port));
|
||||
|
||||
List<String> breakpoints;
|
||||
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
|
||||
|
@ -42,6 +42,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
|
||||
|
||||
String resource_path = GlobalConfig::get_singleton()->get_resource_path();
|
||||
String remote_host = EditorSettings::get_singleton()->get("network/debug/remote_host");
|
||||
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
|
||||
|
||||
if (resource_path != "") {
|
||||
args.push_back("-path");
|
||||
@ -50,7 +51,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li
|
||||
|
||||
if (true) {
|
||||
args.push_back("-rdebug");
|
||||
args.push_back(remote_host + ":" + String::num(GLOBAL_GET("network/debug/remote_port")));
|
||||
args.push_back(remote_host + ":" + String::num(remote_port));
|
||||
}
|
||||
|
||||
args.push_back("-epid");
|
||||
|
@ -581,12 +581,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
GLOBAL_DEF("memory/multithread/thread_rid_pool_prealloc", 60);
|
||||
|
||||
GLOBAL_DEF("network/debug/max_remote_stdout_chars_per_second", 2048);
|
||||
GLOBAL_DEF("network/debug/remote_port", 6007);
|
||||
|
||||
if (debug_mode == "remote") {
|
||||
|
||||
ScriptDebuggerRemote *sdr = memnew(ScriptDebuggerRemote);
|
||||
uint16_t debug_port = GLOBAL_GET("network/debug/remote_port");
|
||||
uint16_t debug_port = 6007;
|
||||
if (debug_host.find(":") != -1) {
|
||||
int sep_pos = debug_host.find_last(":");
|
||||
debug_port = debug_host.substr(sep_pos + 1, debug_host.length()).to_int();
|
||||
|
@ -1714,7 +1714,7 @@ Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {
|
||||
args.push_back("--remove-all");
|
||||
err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
|
||||
|
||||
int port = GlobalConfig::get_singleton()->get("network/debug/remote_port");
|
||||
int port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
|
||||
args.clear();
|
||||
args.push_back("reverse");
|
||||
args.push_back("tcp:"+itos(port));
|
||||
@ -2993,7 +2993,7 @@ public:
|
||||
args.push_back("--remove-all");
|
||||
err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
|
||||
|
||||
int port = GlobalConfig::get_singleton()->get("network/debug/remote_port");
|
||||
int port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
|
||||
args.clear();
|
||||
args.push_back("reverse");
|
||||
args.push_back("tcp:" + itos(port));
|
||||
|
Loading…
Reference in New Issue
Block a user