From 59e74374c0a6560433c8c3088bdb97fe26e2ea57 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 5 Nov 2022 12:09:46 +0100 Subject: [Editor] Fix invalid run args when remote debug is unavailable. --- editor/editor_run.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index 599df12bd3..41d5d1b0d2 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -57,8 +57,11 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) { args.push_back(resource_path.replace(" ", "%20")); } - args.push_back("--remote-debug"); - args.push_back(EditorDebuggerNode::get_singleton()->get_server_uri()); + const String debug_uri = EditorDebuggerNode::get_singleton()->get_server_uri(); + if (debug_uri.size()) { + args.push_back("--remote-debug"); + args.push_back(debug_uri); + } args.push_back("--editor-pid"); args.push_back(itos(OS::get_singleton()->get_process_id())); -- cgit v1.2.3