You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Editor now shows error when debug port is in use
(cherry picked from commit fc1368bee0)
This commit is contained in:
committed by
Rémi Verschelde
parent
f1901d8e3f
commit
f6f8628ec9
@@ -1029,14 +1029,17 @@ void ScriptEditorDebugger::start() {
|
|||||||
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
|
EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t port = GLOBAL_DEF("debug/remote_port", 6007);
|
|
||||||
perf_history.clear();
|
perf_history.clear();
|
||||||
for (int i = 0; i < Performance::MONITOR_MAX; i++) {
|
for (int i = 0; i < Performance::MONITOR_MAX; i++) {
|
||||||
|
|
||||||
perf_max[i] = 0;
|
perf_max[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
server->listen(port);
|
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
|
||||||
|
if (server->listen(remote_port) != OK) {
|
||||||
|
EditorNode::get_log()->add_message(String("** Error listening on port ") + itos(remote_port) + String(" **"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
set_process(true);
|
set_process(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user