qDebug
Introduction
qDebug makes certain features of qASIC easier and faster to use. It's mostly used for logging console messages but that isn't the only thing it's made to do.
Logging console messages
To log a message simply use qDebug.Log() or one of the other log methods.
qDebug.Log("message"); //logs a message in the default color
qDebug.Log(4f); //you can also use objects instead of messages
qDebug.Log("message", "color"); //logs a message in the specified color
qDebug.Log("message", new Color(0f, 1f, 0f)); //you can also use normal Colors
qDebug.LogWarning("message"); //logs a message in the warning color
qDebug.LogError("message"); //logs a message in the error colorDisplaying debug values
qDebug can also display debug values on screen using the Info Displayer. It uses the tag 'debug' so you don't have to worry about it affecting your other displayers.
//You have to specify a tag
qDebug.DisplayValue("tag", 1f)If the displayer doesn't exist it will automatically generate a new one. This only happens in the editor, but you can create one from the console by using the debugdisplayer command. You can also clear the displayer with cleardebugdisplayer
Last updated