Skip to content
JasXSL edited this page Nov 29, 2017 · 3 revisions

Built in debugging is currently sort of wonky, better code is needed. Here's a reference for those of you who want to use it.

To use the debugging feature, you need to define DEBUG:

#define DEBUG DEBUG_ALL

If you omit #define DEBUG, no debug data will be output (except for qd(), more on this below), and all debug() functions will be ignored on compile time, consuming no memory.

DEBUG_ALL will output all debug. You can set this to any level you want. Here is a list of debug functions you can use, and the minimum level needed for them to be output:

Function Minimum Level (from min to max)
debug() DEBUG_USER
debugRare() DEBUG_RARE
debugUncommon() DEBUG_UNCOMMON
debugCommon() DEBUG_COMMON
qd() N/A

These debug functions accept one argument which is the var you want to output. Any variable you enter into your debug function will be automatically converted to a string. A timestamp, the script name and line will be prepended to the message. Example usage:

debug("This is my debug")
debug(10.3)

A debug you can always use regardless of you have defined DEBUG is qd(message)

All debug messages will output an SLT timestamp with millisecond precision, the name of the script, the line of the debug call, and your message. Ex: qd("My Custom Debug Message"); -> 17:30:03.527 New Script @ 6: My Custom Debug Message

Clone this wiki locally