VisualScriptDebugger
- Module
- VisualScripting
- Header
#include "VisualScripting/VisualScriptDebugger.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetEnabled | |
bool | IsEnabled | |
void | AddSession | External debug sessions (the DAP server) hold the debugger open independently of the editor's SetEnabled toggle: the effective state is "editor asked for it OR at least one session is attached". |
void | RemoveSession | |
int32_t | SessionCount | |
bool | IsPaused | |
uint64_t | PauseSerial | |
const std::vector<VisualScriptDebugFrame>& | Frames | |
const VisualScriptContext& | PausedContext | |
const VisualScriptGraph* | PausedGraph | |
int | PausedNode | |
std::string | PausedClassName | |
std::string | PausedGraphName | |
std::string | PausedFunctionName | |
bool | CollectPulseNodes | |
void | RequestContinue | |
void | RequestStepOver | |
void | RequestStepInto | |
void | RequestStepOut | Runs until control leaves the innermost paused frame (the DAP stepOut). |
void | RequestBreakNext | Asynchronous break: arms a one-shot stop on the next exec node any graph reaches. |
bool | IsBreakNextArmed | |
bool | HasPendingResume | |
bool | PumpResume | |
void | CancelPaused | |
bool | EvaluateOutput | |
bool | EvaluateInput | |
bool | EvaluateExpression | Visual Script expression text (the grammar breakpoint conditions use) evaluated in a paused frame. |
bool | SetVariable | Writes a variable of a paused frame: a function frame's param/local, or (instanceScope, or no such local) the instance variable store. |
uint64_t | LogpointCount | Logpoint output. |
std::vector<std::string> | LogpointMessagesSince | |
double | Now | |
std::vector<VisualScriptTraceEntry> | RecentTrace | |
std::string | ResolveGraphName | |
std::string | FormatValue |
Function details
SetEnabled
static void SetEnabled(bool enabled)IsEnabled
static bool IsEnabled()AddSession
static void AddSession()External debug sessions (the DAP server) hold the debugger open independently of the editor's SetEnabled toggle: the effective state is "editor asked for it OR at least one session is attached". Without the refcount the editor's per-tick toggle would disable an attached IDE.
RemoveSession
static void RemoveSession()SessionCount
static int32_t SessionCount()IsPaused
static bool IsPaused()PauseSerial
static uint64_t PauseSerial()Frames
static const std::vector<VisualScriptDebugFrame>& Frames()PausedContext
static const VisualScriptContext& PausedContext()PausedGraph
static const VisualScriptGraph* PausedGraph()PausedNode
static int PausedNode()PausedClassName
static std::string PausedClassName()PausedGraphName
static std::string PausedGraphName()PausedFunctionName
static std::string PausedFunctionName()CollectPulseNodes
static bool CollectPulseNodes(const std::string& className, const std::string& graphName, double maxAgeSeconds, std::vector<int>& out)RequestContinue
static void RequestContinue()RequestStepOver
static void RequestStepOver()RequestStepInto
static void RequestStepInto()RequestStepOut
static void RequestStepOut()Runs until control leaves the innermost paused frame (the DAP stepOut). At the outermost frame there is nothing to step out of, so it behaves like Continue.
RequestBreakNext
static void RequestBreakNext()Asynchronous break: arms a one-shot stop on the next exec node any graph reaches. No effect while already paused.
IsBreakNextArmed
static bool IsBreakNextArmed()HasPendingResume
static bool HasPendingResume()PumpResume
static bool PumpResume()CancelPaused
static void CancelPaused()EvaluateOutput
static bool EvaluateOutput(size_t frameIdx, int node, int pin, VisualScriptValue& out)EvaluateInput
static bool EvaluateInput(size_t frameIdx, int node, int inputIdx, VisualScriptValue& out)EvaluateExpression
static bool EvaluateExpression(size_t frameIdx, const std::string& expression, VisualScriptValue& out, std::string* outError = nullptr)Visual Script expression text (the grammar breakpoint conditions use) evaluated in a paused frame. An identifier that names no variable, param or local is an error rather than a silent default, so a typo never reads as 0.
SetVariable
static bool SetVariable(size_t frameIdx, const std::string& name, const std::string& valueText, bool instanceScope, VisualScriptValue* outNewValue = nullptr, std::string* outError = nullptr)Writes a variable of a paused frame: a function frame's param/local, or (instanceScope, or no such local) the instance variable store. The text is coerced to the variable's current type — numbers and bools go through the expression evaluator, so "Health - 10" works; vectors take "x, y, z"; strings take the text verbatim (surrounding quotes stripped).
LogpointCount
static uint64_t LogpointCount()Logpoint output. Every consumer (the editor, each DAP session) keeps its own cursor, so one reader never eats another's lines. Only the most recent lines are retained.
LogpointMessagesSince
static std::vector<std::string> LogpointMessagesSince(uint64_t& cursor)Now
static double Now()RecentTrace
static std::vector<VisualScriptTraceEntry> RecentTrace(double maxAgeSeconds)ResolveGraphName
static std::string ResolveGraphName(const VisualScriptClass* cls, const VisualScriptGraph* graph)FormatValue
static std::string FormatValue(const VisualScriptValue& v)