summaryrefslogtreecommitdiffstats
path: root/editor/debugger/debug_adapter/debug_adapter_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/debugger/debug_adapter/debug_adapter_protocol.h')
-rw-r--r--editor/debugger/debug_adapter/debug_adapter_protocol.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.h b/editor/debugger/debug_adapter/debug_adapter_protocol.h
index caff0f9c7f..1d1e183850 100644
--- a/editor/debugger/debug_adapter/debug_adapter_protocol.h
+++ b/editor/debugger/debug_adapter/debug_adapter_protocol.h
@@ -31,12 +31,13 @@
#ifndef DEBUG_ADAPTER_PROTOCOL_H
#define DEBUG_ADAPTER_PROTOCOL_H
-#include "core/io/stream_peer.h"
+#include "core/debugger/debugger_marshalls.h"
#include "core/io/stream_peer_tcp.h"
#include "core/io/tcp_server.h"
#include "debug_adapter_parser.h"
#include "debug_adapter_types.h"
+#include "scene/debugger/scene_debugger.h"
#define DAP_MAX_BUFFER_SIZE 4194304 // 4MB
#define DAP_MAX_CLIENTS 8
@@ -75,6 +76,8 @@ class DebugAdapterProtocol : public Object {
friend class DebugAdapterParser;
+ using DAPVarID = int;
+
private:
static DebugAdapterProtocol *singleton;
DebugAdapterParser *parser = nullptr;
@@ -99,6 +102,13 @@ private:
void reset_stack_info();
int parse_variant(const Variant &p_var);
+ void parse_object(SceneDebuggerObject &p_obj);
+ const Variant parse_object_variable(const SceneDebuggerObject::SceneDebuggerProperty &p_property);
+ void parse_evaluation(DebuggerMarshalls::ScriptStackVariable &p_var);
+
+ ObjectID search_object_id(DAPVarID p_var_id);
+ bool request_remote_object(const ObjectID &p_object_id);
+ bool request_remote_evaluate(const String &p_eval, int p_stack_frame);
bool _initialized = false;
bool _processing_breakpoint = false;
@@ -106,7 +116,7 @@ private:
bool _processing_stackdump = false;
int _remaining_vars = 0;
int _current_frame = 0;
- uint64_t _request_timeout = 1000;
+ uint64_t _request_timeout = 5000;
bool _sync_breakpoints = false;
String _current_request;
@@ -114,10 +124,16 @@ private:
int breakpoint_id = 0;
int stackframe_id = 0;
- int variable_id = 0;
+ DAPVarID variable_id = 0;
List<DAP::Breakpoint> breakpoint_list;
HashMap<DAP::StackFrame, List<int>, DAP::StackFrame> stackframe_list;
- HashMap<int, Array> variable_list;
+ HashMap<DAPVarID, Array> variable_list;
+
+ HashMap<ObjectID, DAPVarID> object_list;
+ HashSet<ObjectID> object_pending_set;
+
+ HashMap<String, DAP::Variable> eval_list;
+ HashSet<String> eval_pending_list;
public:
friend class DebugAdapterServer;