Skip to content

Debug Module

STBrian edited this page Oct 28, 2025 · 4 revisions

On this module you can find some useful functions to help you with debugging your code and find the root of bugs in the code

Functions

Core.Debug.message Shows a notification on screen
Core.Debug.error Shows a notification on screen on red font
Core.Debug.log Appends the message to the log file
Core.Debug.logerror Appends the message to the log file as an error

Core.Debug.message

It will show a notification on the top screen with the message that will last 5 seconds

Core.Debug.message(msg: string)

Core.Debug.error

Does the same as message, but shows the message in red font

Core.Debug.error(msg: string)

Core.Debug.log

Appends the message to the log file of LunaCore and optionally you can show it to the screen like message function. By default showOnScreen is false

Core.Debug.log(msg: string, showOnScreen: boolean?)

Core.Debug.logerror

Does the same as log, but adds the prefix [ERROR] a the start of the message and shows the message to the screen in red font

Core.Debug.logerror(msg: string)

Clone this wiki locally