载入中...
搜索中...
未找到
eve::dev::DebugAdapter类 参考

Minimal Debug Adapter Protocol (DAP) server for VS Code. 更多...

#include <DebugAdapter.hpp>

Public 成员函数

 DebugAdapter (const DebugAdapter &)=delete
 
DebugAdapter & operator= (const DebugAdapter &)=delete
 
int listen (uint16_t port)
 Bind TCP listen port (0 = ephemeral). Returns bound port or 0 on failure.
 
void stop ()
 
bool isListening () const
 
int port () const
 
bool hasClient () const
 
void setSourceRoot (std::string root)
 Game directory used to resolve relative script paths in stack frames.
 
const std::string & sourceRoot () const
 
void registerSource (std::string name, std::string content)
 Register virtual source content for compiled buffers (compilestring).
 
void poll ()
 Accept clients + process one request batch (non-blocking).
 
bool isConfigured () const
 True after the IDE sends configurationDone (breakpoints are installed).
 
bool waitUntilConfigured (int timeoutMs=15000)
 Block briefly until a DAP client finishes initialize/launch/setBreakpoints/ configurationDone so scripts do not race past early breakpoints. Returns true if configured, false on timeout (game still starts).
 
void notifyStopped (PauseReason reason, const SourceLoc &loc, const std::string &description={})
 Emit stopped event to the connected client (if any).
 
void notifyContinued ()
 
void notifyTerminated ()
 
const std::string & lastException () const
 Last exception message delivered via notifyStopped(Exception, ...).
 

静态 Public 成员函数

static DebugAdapter & instance ()
 

详细描述

Minimal Debug Adapter Protocol (DAP) server for VS Code.

Speaks Content-Length framed JSON over TCP. Start with listen(port) after DevTool::attach; call poll() from the game loop / pause wait pump.

Supported requests: initialize, launch/attach, setBreakpoints, configurationDone, threads, stackTrace, scopes, variables, continue, next/stepIn/stepOut, pause, evaluate, disconnect, and custom errorSlice for the last DevTool dynamic backward slice.

在文件 DebugAdapter.hpp 第 38 行定义.

构造及析构函数说明

◆ DebugAdapter()

eve::dev::DebugAdapter::DebugAdapter ( const DebugAdapter &  )
delete

成员函数说明

◆ hasClient()

bool eve::dev::DebugAdapter::hasClient ( ) const
inline

在文件 DebugAdapter.hpp 第 50 行定义.

◆ instance()

DebugAdapter & eve::dev::DebugAdapter::instance ( )
static

◆ isConfigured()

bool eve::dev::DebugAdapter::isConfigured ( ) const
inline

True after the IDE sends configurationDone (breakpoints are installed).

在文件 DebugAdapter.hpp 第 62 行定义.

◆ isListening()

bool eve::dev::DebugAdapter::isListening ( ) const
inline

在文件 DebugAdapter.hpp 第 48 行定义.

◆ lastException()

const std::string & eve::dev::DebugAdapter::lastException ( ) const
inline

Last exception message delivered via notifyStopped(Exception, ...).

在文件 DebugAdapter.hpp 第 77 行定义.

◆ listen()

int eve::dev::DebugAdapter::listen ( uint16_t  port)

Bind TCP listen port (0 = ephemeral). Returns bound port or 0 on failure.

在文件 DebugAdapter.cpp 第 228 行定义.

引用了 eve::dev::Debugger::instance(), line, port(), eve::dev::Debugger::setBreakpointEventFn(), setSourceRoot(), source , 以及 stop().

被这些函数引用 eve::dev::DevTool::startDap().

◆ notifyContinued()

void eve::dev::DebugAdapter::notifyContinued ( )

在文件 DebugAdapter.cpp 第 384 行定义.

引用了 body.

被这些函数引用 eve::dev::DevTool::exposeScriptApi().

◆ notifyStopped()

void eve::dev::DebugAdapter::notifyStopped ( PauseReason  reason,
const SourceLoc &  loc,
const std::string &  description = {} 
)

◆ notifyTerminated()

void eve::dev::DebugAdapter::notifyTerminated ( )

在文件 DebugAdapter.cpp 第 391 行定义.

◆ operator=()

DebugAdapter & eve::dev::DebugAdapter::operator= ( const DebugAdapter &  )
delete

◆ poll()

void eve::dev::DebugAdapter::poll ( )

Accept clients + process one request batch (non-blocking).

在文件 DebugAdapter.cpp 第 857 行定义.

被这些函数引用 eve::dev::DevTool::poll() , 以及 waitUntilConfigured().

◆ port()

int eve::dev::DebugAdapter::port ( ) const
inline

在文件 DebugAdapter.hpp 第 49 行定义.

被这些函数引用 listen().

◆ registerSource()

void eve::dev::DebugAdapter::registerSource ( std::string  name,
std::string  content 
)

Register virtual source content for compiled buffers (compilestring).

在文件 DebugAdapter.cpp 第 91 行定义.

引用了 name , 以及 eve::dev::Debugger::normalizeSource().

被这些函数引用 eve::dev::DevTool::exposeScriptApi().

◆ setSourceRoot()

void eve::dev::DebugAdapter::setSourceRoot ( std::string  root)

Game directory used to resolve relative script paths in stack frames.

在文件 DebugAdapter.cpp 第 82 行定义.

引用了 c , 以及 root.

被这些函数引用 listen().

◆ sourceRoot()

const std::string & eve::dev::DebugAdapter::sourceRoot ( ) const
inline

在文件 DebugAdapter.hpp 第 54 行定义.

◆ stop()

void eve::dev::DebugAdapter::stop ( )

◆ waitUntilConfigured()

bool eve::dev::DebugAdapter::waitUntilConfigured ( int  timeoutMs = 15000)

Block briefly until a DAP client finishes initialize/launch/setBreakpoints/ configurationDone so scripts do not race past early breakpoints. Returns true if configured, false on timeout (game still starts).

在文件 DebugAdapter.cpp 第 864 行定义.

引用了 deadline , 以及 poll().


该类的文档由以下文件生成: