Browse Source

Merge pull request #104842 from YeldhamDev/dap_fix

Fix remote object inspector through DAP
Thaddeus Crews 4 months ago
parent
commit
afa8057e30
1 changed files with 7 additions and 5 deletions
  1. 7 5
      editor/debugger/debug_adapter/debug_adapter_protocol.cpp

+ 7 - 5
editor/debugger/debug_adapter/debug_adapter_protocol.cpp

@@ -1163,12 +1163,14 @@ void DebugAdapterProtocol::on_debug_data(const String &p_msg, const Array &p_dat
 		return;
 	}
 
-	if (p_msg == "scene:inspect_object") {
-		// An object was requested from the debuggee; parse it.
-		SceneDebuggerObject remote_obj;
-		remote_obj.deserialize(p_data);
+	if (p_msg == "scene:inspect_objects") {
+		if (!p_data.is_empty()) {
+			// An object was requested from the debuggee; parse it.
+			SceneDebuggerObject remote_obj;
+			remote_obj.deserialize(p_data[0]);
 
-		parse_object(remote_obj);
+			parse_object(remote_obj);
+		}
 	} else if (p_msg == "evaluation_return") {
 		// An evaluation was requested from the debuggee; parse it.
 		DebuggerMarshalls::ScriptStackVariable remote_evaluation;