载入中...
搜索中...
未找到
DevTool.cpp
浏览该文件的文档.
std::string statusLine() const
Compact status line for overlays / MCP resources.
Definition AiPanel.cpp:117
void drawImGui()
Optional ImGui draw hook. Default no-op: in-engine AI status is exposed via MCP / eve....
Definition AiPanel.cpp:140
SliceResult sliceBackward(const SliceCriterion &criterion) const
Dynamic backward slice from an error criterion. Follows data dependencies (Use←Def) and control prede...
Definition CallGraph.cpp:315
uint32_t onUse(const SourceLoc &loc, const std::string &var)
Definition CallGraph.cpp:154
std::string formatErrorReport(const std::string &errorMessage, const SliceCriterion &criterion) const
Human-readable report: message + call stack + data-flow + slice locs.
Definition CallGraph.cpp:396
uint32_t onDef(const SourceLoc &loc, const std::string &var)
Definition CallGraph.cpp:139
std::vector< CallFrame > currentStack() const
Definition CallGraph.cpp:211
uint32_t onCall(const SourceLoc &loc, const std::string &funcName={})
Definition CallGraph.cpp:115
uint32_t onReturn(const SourceLoc &loc, const std::string &funcName={})
Definition CallGraph.cpp:125
In-engine runtime console / log ring buffer for DevTools.
Definition ConsolePanel.hpp:38
std::vector< ConsoleLine > recent(size_t max=128) const
Definition ConsolePanel.cpp:181
void addLog(std::string level, std::string text)
Append a leveled log line (thread-safe).
Definition ConsolePanel.cpp:154
std::string eval(const std::string &expression)
Evaluate a Squirrel expression against the root table and return a formatted result (or error message...
Definition ConsolePanel.cpp:217
void attach(HSQUIRRELVM vm)
Attach to a Squirrel VM: capture print/script errors into the log.
Definition ConsolePanel.cpp:199
std::string format(size_t max=128) const
Definition ConsolePanel.cpp:190
void drawImGui()
Optional ImGui draw hook. Default no-op: console UI is registered by the host (see setImGuiDrawer) so...
Definition ConsolePanel.cpp:254
void poll()
Accept clients + process one request batch (non-blocking).
Definition DebugAdapter.cpp:814
int listen(uint16_t port)
Bind TCP listen port (0 = ephemeral). Returns bound port or 0 on failure.
Definition DebugAdapter.cpp:224
void registerSource(std::string name, std::string content)
Register virtual source content for compiled buffers (compilestring).
Definition DebugAdapter.cpp:89
void notifyStopped(PauseReason reason, const SourceLoc &loc, const std::string &description={})
Emit stopped event to the connected client (if any).
Definition DebugAdapter.cpp:351
Script + frame debugger: pause/step, breakpoints, watches.
Definition Debugger.hpp:83
void waitWhilePaused(const std::function< void()> &pump={})
Block until resume/step/detach (processes external poll callbacks).
Definition Debugger.cpp:572
void setBreakOnError(bool on)
Break on script errors (Godot "Break on Error"). Default off.
Definition Debugger.hpp:168
void refreshWatches()
Re-evaluate all watches against current VM (paused preferred).
Definition Debugger.cpp:663
void notifyFrameDone()
After a frame when StepFrame was active → return to Paused.
Definition Debugger.cpp:453
bool removeWatch(const std::string &expression)
Definition Debugger.cpp:644
void stepOver()
Skip calls: stop on the next line at ≤ current stack depth.
Definition Debugger.cpp:421
bool shouldRunUpdate()
Frame loop: true ⇒ call eve_update this frame. Consumes StepFrame.
Definition Debugger.cpp:443
void pause(PauseReason reason=PauseReason::PauseKey)
Definition Debugger.cpp:368
bool clearBreakpoint(std::string source, int line)
Definition Debugger.cpp:603
void setBreakpointsEnabled(bool on)
Master switch for all breakpoints ("skip all breakpoints").
Definition Debugger.hpp:171
int setBreakpoint(std::string source, int line, bool enabled=true, std::string condition={})
Definition Debugger.cpp:581
void step()
Convenience: script stepOver when mid-hook; otherwise one game frame. Prefer stepInto/stepOver/stepOu...
Definition Debugger.cpp:432
VariableInfo evaluate(const std::string &expression, int frameLevel=0) const
Evaluate an expression in the given frame's scope. Understands plain names, a.b paths,...
Definition Debugger.cpp:872
void clearBreakpoints(const std::string &source={})
Definition Debugger.cpp:614
Platform-level script + render debugger / dynamic slicer front-end.
Definition DevTool.hpp:43
void enableRenderTrace(bool on=true)
Enable render-flow tracing without a Squirrel VM (C++ / unit tests).
Definition DevTool.cpp:136
int startDap(uint16_t port)
Start DAP server; returns bound port (0 on failure).
Definition DevTool.cpp:182
void handleDebugEvent(HSQUIRRELVM vm, int type, const char *source, int line, const char *funcname)
Definition DevTool.cpp:404
void attach(ssq::VM &vm, bool sampleLocals=true)
Attach script tracer to VM and enable render tracing.
Definition DevTool.cpp:123
void exposeScriptApi(ssq::VM &vm)
Expose eve.dev script API (pause/breakpoint/watch/snapshot/AI).
Definition DevTool.cpp:205
int startMcp(uint16_t port)
Start MCP server for AI tooling; returns bound port (0 on failure).
Definition DevTool.cpp:186
std::string notifyError(const std::string &errorMessage, const std::vector< std::string > &hintVars={})
Record an error; includes script slice and render-pipeline slice when enabled.
Definition DevTool.cpp:628
void drawConsolePanel()
Draw DevTools console ImGui panel when visible (call from UI/frame loop).
Definition DevTool.cpp:203
std::string formatProfileReport() const
Definition DevTool.cpp:711
std::string formatError(const std::string &errorMessage, const std::vector< std::string > &hintVars={}) const
Definition DevTool.cpp:566
void drawAiPanel()
Draw DevTools AI ImGui panel when visible (call from UI/frame loop).
Definition DevTool.cpp:201
SliceResult analyzeError(const std::string &errorMessage, const std::vector< std::string > &hintVars={}) const
Definition DevTool.cpp:534
Embedded Model Context Protocol (MCP) server for AI-assisted game development.
Definition McpServer.hpp:35
int listen(uint16_t port)
Bind TCP listen port (0 = ephemeral). Returns bound port or 0 on failure.
Definition McpServer.cpp:1553
std::string formatErrorReport(const std::string &errorMessage, const RenderSliceCriterion &c={}) const
Definition RenderFlow.cpp:231
void notifyPending(const std::string &reason, const std::string &source, int line)
Record that a breakpoint / critical site wants a vision dump.
Definition RenderVision.cpp:156
std::vector< std::string > rootsFor(HSQUIRRELVM vm) const
Marked roots, or heuristic roots when none marked (script-facing).
Definition Snapshot.hpp:48
bool restore(HSQUIRRELVM vm, const std::string &json, std::string *error=nullptr) const
Definition Snapshot.cpp:468
std::string capture(HSQUIRRELVM vm, std::string *error=nullptr) const
Capture marked roots, or heuristic roots when none marked.
Definition Snapshot.cpp:401
bool loadFile(HSQUIRRELVM vm, const std::string &path, std::string *error=nullptr) const
Definition Snapshot.cpp:494
bool saveFile(HSQUIRRELVM vm, const std::string &path, std::string *error=nullptr) const
Definition Snapshot.cpp:482
A named event carrying an ordered list of Variant payloads. Pushed messages are heap-allocated; the q...
Definition Event.h:56
Definition AiPanel.cpp:8
@ StepFrame
std::string mcpFormatError(const std::string &message)
Definition DevTool.cpp:682
bool mcpDevAttached()
Thin hooks so McpServer.cpp need not include DevTool.hpp (avoids a cycle).
Definition DevTool.cpp:672
@ PauseKey
@ Exception
std::string formatScriptError(const ScriptErrorContext &ctx)
Formats a context into a human-readable multi-line report.
Definition ScriptError.cpp:189
void setLastScriptError(HSQUIRRELVM vm, ScriptErrorContext ctx)
Records the last error for a VM (thread-local, synchronous consumers).
Definition ScriptError.cpp:206
ScriptErrorContext captureScriptError(HSQUIRRELVM vm)
Captures the pending runtime error from inside the Squirrel error handler.
Definition ScriptError.cpp:80
Definition Build.cpp:11
Criterion for a Weiser-style dynamic backward slice.
Definition CallGraph.hpp:57
Definition CallGraph.hpp:63
Structured snapshot of a script error: message, throw site and stack.
Definition ScriptError.h:25