Module debugger
Debugger module for the Micro2D engine.
Info:
- Author: Sharper Dev
Functions
| Debugger.setupDebugger () | Internal function to set up the debugger UI when the sequence code is activated. |
| Debugger.msg (msg) | Adds a message to the debugger console when the debugger is enabled. |
| Debugger.update () | Internal function that updates the debugger state each frame. |
| Debugger.isEnabled () | Returns whether debugger updates are enabled. |
| Debugger.setEnable (value) | Enables or disables debugger updates. |
| Debugger.debugObject (obj) | Selects the object whose details are shown by the debugger. |
| Debugger.getDebugObject () | Returns the selected debug object, if any. |
Local Functions
| updateRuntimeInfo () | Internal function to update the runtime info. |
| updateObjectInfo () | Internal function to update the object info. |
Functions
- Debugger.setupDebugger ()
- Internal function to set up the debugger UI when the sequence code is activated.
- Debugger.msg (msg)
-
Adds a message to the debugger console when the debugger is enabled.
The console retains only the four most recent messages.
Parameters:
- msg string Message text to display.
Usage:
Debugger.msg("Simulation started")
- Debugger.update ()
- Internal function that updates the debugger state each frame.
- Debugger.isEnabled ()
-
Returns whether debugger updates are enabled.
Returns:
-
boolean enabled True when the debugger is enabled.
Usage:
local enabled = Debugger.isEnabled()
- Debugger.setEnable (value)
-
Enables or disables debugger updates.
Parameters:
- value boolean True to enable the debugger; false to disable it.
Usage:
Debugger.setEnable(false)
- Debugger.debugObject (obj)
-
Selects the object whose details are shown by the debugger.
Pass nil to clear the selection.
Parameters:
- obj GameObject|nil Object to inspect, or nil to clear it.
Usage:
Debugger.debugObject(myGameObject) - Debugger.getDebugObject ()
-
Returns the selected debug object, if any.
Returns:
-
GameObject|nil object Selected object, or nil when none is selected.
Usage:
local object = Debugger.getDebugObject()