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.
在文件 DebugAdapter.hpp 第 37 行定义.
构造及析构函数说明
◆ DebugAdapter()
|
delete |
成员函数说明
◆ hasClient()
|
inline |
在文件 DebugAdapter.hpp 第 49 行定义.
◆ instance()
|
static |
在文件 DebugAdapter.cpp 第 71 行定义.
被这些函数引用 eve::dev::DevTool::poll(), eve::dev::DevTool::startDap() , 以及 eve::dev::DevTool::stopDap().
◆ isConfigured()
|
inline |
True after the IDE sends configurationDone (breakpoints are installed).
在文件 DebugAdapter.hpp 第 61 行定义.
◆ isListening()
|
inline |
在文件 DebugAdapter.hpp 第 47 行定义.
◆ lastException()
|
inline |
Last exception message delivered via notifyStopped(Exception, ...).
在文件 DebugAdapter.hpp 第 76 行定义.
◆ listen()
| int eve::dev::DebugAdapter::listen | ( | uint16_t | port | ) |
Bind TCP listen port (0 = ephemeral). Returns bound port or 0 on failure.
在文件 DebugAdapter.cpp 第 224 行定义.
引用了 eve::dev::Debugger::instance(), line, port(), eve::dev::Debugger::setBreakpointEventFn(), setSourceRoot() , 以及 stop().
被这些函数引用 eve::dev::DevTool::startDap().
◆ notifyContinued()
| void eve::dev::DebugAdapter::notifyContinued | ( | ) |
◆ 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.cpp 第 351 行定义.
引用了 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.cpp 第 380 行定义.
◆ operator=()
|
delete |
◆ poll()
| void eve::dev::DebugAdapter::poll | ( | ) |
Accept clients + process one request batch (non-blocking).
在文件 DebugAdapter.cpp 第 814 行定义.
被这些函数引用 eve::dev::DevTool::poll() , 以及 waitUntilConfigured().
◆ port()
|
inline |
在文件 DebugAdapter.hpp 第 48 行定义.
被这些函数引用 listen().
◆ registerSource()
| void eve::dev::DebugAdapter::registerSource | ( | std::string | name, |
| std::string | content | ||
| ) |
Register virtual source content for compiled buffers (compilestring).
在文件 DebugAdapter.cpp 第 89 行定义.
引用了 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 第 80 行定义.
引用了 c.
被这些函数引用 listen().
◆ sourceRoot()
|
inline |
在文件 DebugAdapter.hpp 第 53 行定义.
◆ stop()
| void eve::dev::DebugAdapter::stop | ( | ) |
在文件 DebugAdapter.cpp 第 252 行定义.
引用了 eve::dev::Debugger::instance() , 以及 eve::dev::Debugger::setBreakpointEventFn().
被这些函数引用 listen() , 以及 eve::dev::DevTool::stopDap().
◆ 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 第 821 行定义.
引用了 poll().
该类的文档由以下文件生成:
- src/engine/devtools/DebugAdapter.hpp
- src/engine/devtools/DebugAdapter.cpp