summaryrefslogtreecommitdiffstats
path: root/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/debugger/debug_adapter/debug_adapter_protocol.cpp')
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
index d03df88b75..4febb8bf04 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp
@@ -607,7 +607,7 @@ int DebugAdapterProtocol::parse_variant(const Variant &p_var) {
}
case Variant::PACKED_VECTOR3_ARRAY: {
int id = variable_id++;
- PackedVector2Array array = p_var;
+ PackedVector3Array array = p_var;
DAP::Variable size;
size.name = "size";
size.type = Variant::get_type_name(Variant::INT);
@@ -649,6 +649,28 @@ int DebugAdapterProtocol::parse_variant(const Variant &p_var) {
variable_list.insert(id, arr);
return id;
}
+ case Variant::PACKED_VECTOR4_ARRAY: {
+ int id = variable_id++;
+ PackedVector4Array array = p_var;
+ DAP::Variable size;
+ size.name = "size";
+ size.type = Variant::get_type_name(Variant::INT);
+ size.value = itos(array.size());
+
+ Array arr;
+ arr.push_back(size.to_json());
+
+ for (int i = 0; i < array.size(); i++) {
+ DAP::Variable var;
+ var.name = itos(i);
+ var.type = Variant::get_type_name(Variant::VECTOR4);
+ var.value = array[i];
+ var.variablesReference = parse_variant(array[i]);
+ arr.push_back(var.to_json());
+ }
+ variable_list.insert(id, arr);
+ return id;
+ }
default:
// Simple atomic stuff, or too complex to be manipulated
return 0;
@@ -945,7 +967,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) {
List<int> scope_ids = stackframe_list.find(frame)->value;
ERR_FAIL_COND(scope_ids.size() != 3);
ERR_FAIL_INDEX(stack_var.type, 3);
- int var_id = scope_ids[stack_var.type];
+ int var_id = scope_ids.get(stack_var.type);
DAP::Variable variable;
@@ -1021,7 +1043,7 @@ DebugAdapterProtocol::DebugAdapterProtocol() {
reset_ids();
- EditorRunBar::get_singleton()->get_pause_button()->connect("pressed", callable_mp(this, &DebugAdapterProtocol::on_debug_paused));
+ EditorRunBar::get_singleton()->get_pause_button()->connect(SceneStringName(pressed), callable_mp(this, &DebugAdapterProtocol::on_debug_paused));
EditorDebuggerNode *debugger_node = EditorDebuggerNode::get_singleton();
debugger_node->connect("breakpoint_toggled", callable_mp(this, &DebugAdapterProtocol::on_debug_breakpoint_toggled));