Struct DebugApi
- Namespace
- LunyScript.Api
- Assembly
- LunyScript.dll
Provides diagnostics blocks which are omitted from release builds, unless the scripting symbol LUNYSCRIPT_DEBUG is defined.
public readonly struct DebugApi
Methods
Break(string)
Triggers a debugger breakpoint if debugger is attached by calling System.Diagnostics.Debugger.Break(). Completely stripped in release builds. Only breaks when DEBUG or LUNYSCRIPT_DEBUG is defined.
public ScriptActionBlock Break(string message = null)
Parameters
messagestring
Returns
Log(VariableBlock)
Logs a variable. Alias for LogInfo().
public ScriptActionBlock Log(VariableBlock variableBlock)
Parameters
variableBlockVariableBlock
Returns
Log(string)
Logs a message. Alias for LogInfo().
public ScriptActionBlock Log(string message)
Parameters
messagestring
Returns
LogError(string)
Logs a debug "error" (red text) message. Only logs when DEBUG or LUNYSCRIPT_DEBUG is defined, stripped in release builds.
public ScriptActionBlock LogError(string message)
Parameters
messagestring
Returns
LogInfo(VariableBlock)
Logs a variable.
public ScriptActionBlock LogInfo(VariableBlock variableBlock)
Parameters
variableBlockVariableBlock
Returns
LogInfo(string)
Logs a debug message that is completely stripped in release builds. Only logs when DEBUG or LUNYSCRIPT_DEBUG is defined.
public ScriptActionBlock LogInfo(string message)
Parameters
messagestring
Returns
LogWarning(string)
Logs a debug "warning" (yellow text) message. Only logs when DEBUG or LUNYSCRIPT_DEBUG is defined, stripped in release builds.
public ScriptActionBlock LogWarning(string message)
Parameters
messagestring