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

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

#include <DebugAdapter.hpp>

Public 成员函数

 DebugAdapter (const DebugAdapter &)=delete
 
DebugAdapteroperator= (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 DebugAdapterinstance ()
 

详细描述

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.

在文件 DebugAdapter.hpp37 行定义.

构造及析构函数说明

◆ DebugAdapter()

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

成员函数说明

◆ hasClient()

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

在文件 DebugAdapter.hpp49 行定义.

◆ 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.hpp61 行定义.

◆ isListening()

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

在文件 DebugAdapter.hpp47 行定义.

◆ lastException()

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

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

在文件 DebugAdapter.hpp76 行定义.

◆ listen()

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

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

在文件 DebugAdapter.cpp224 行定义.

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

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

◆ notifyContinued()

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

在文件 DebugAdapter.cpp373 行定义.

引用了 body.

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

◆ notifyStopped()

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

Emit stopped event to the connected client (if any).

在文件 DebugAdapter.cpp351 行定义.

引用了 body, eve::dev::Exception, eve::dev::SourceLoc::line , 以及 eve::dev::SourceLoc::source.

被这些函数引用 eve::dev::DevTool::exposeScriptApi(), eve::dev::DevTool::handleDebugEvent() , 以及 eve::dev::DevTool::notifyError().

◆ notifyTerminated()

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

在文件 DebugAdapter.cpp380 行定义.

◆ operator=()

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

◆ poll()

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

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

在文件 DebugAdapter.cpp814 行定义.

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

◆ port()

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

在文件 DebugAdapter.hpp48 行定义.

被这些函数引用 listen().

◆ registerSource()

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

Register virtual source content for compiled buffers (compilestring).

在文件 DebugAdapter.cpp89 行定义.

引用了 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.cpp80 行定义.

引用了 c.

被这些函数引用 listen().

◆ sourceRoot()

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

在文件 DebugAdapter.hpp53 行定义.

◆ 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.cpp821 行定义.

引用了 poll().


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