You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Support object inspection through DAP variables request
This commit is contained in:
@@ -31,12 +31,12 @@
|
||||
#ifndef DEBUG_ADAPTER_PROTOCOL_H
|
||||
#define DEBUG_ADAPTER_PROTOCOL_H
|
||||
|
||||
#include "core/io/stream_peer.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 +75,8 @@ class DebugAdapterProtocol : public Object {
|
||||
|
||||
friend class DebugAdapterParser;
|
||||
|
||||
using DAPVarID = int;
|
||||
|
||||
private:
|
||||
static DebugAdapterProtocol *singleton;
|
||||
DebugAdapterParser *parser = nullptr;
|
||||
@@ -99,6 +101,11 @@ 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);
|
||||
|
||||
ObjectID search_object_id(DAPVarID p_var_id);
|
||||
bool request_remote_object(const ObjectID &p_object_id);
|
||||
|
||||
bool _initialized = false;
|
||||
bool _processing_breakpoint = false;
|
||||
@@ -114,10 +121,13 @@ 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;
|
||||
|
||||
public:
|
||||
friend class DebugAdapterServer;
|
||||
|
||||
Reference in New Issue
Block a user