summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-11-05 12:09:46 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-11-05 14:06:09 +0100
commit59e74374c0a6560433c8c3088bdb97fe26e2ea57 (patch)
treeca67db96d764b659f82f454d0819a19cea27447a /editor
parent3ff79641458fc7e27a08a5c8b4386b566facc5dc (diff)
[Editor] Fix invalid run args when remote debug is unavailable.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_run.cpp7
1 files changed, 5 insertions, 2 deletions
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()));