Debug

A library for printing the status of current tasks.

This library contains functions for printing information about the current tasks and script.

It is designed for helping developers to identify problems in their code, such as cases where ambiguous code is misinterpreted by the script loader.

Variables

import [debug]
run debug[variables]

The variables debug function prints out the contents of all variables in the current environment as a key<->value structure.

The output is printed for the script runner.

This allows a developer to see what variables are available in the environment and their values.

Line

import [debug]
run debug[line]

The line debug function prints out the current line's code with highlighting showing its post-parse structure.

The line printed is the line that the debug function was run from, e.g. in the above example it would print run debug[line].

The code printed is reassembled from the interpreted structure, so it shows what the parser understood rather than what the user actually wrote.

Script

import [debug]
run debug[script]

The script debug function prints out the current script's code with highlighting showing its post-parse structure.

As this is printed in a single chat message, very large scripts may fail to print correctly.

The code printed is reassembled from the interpreted structure, so it shows what the parser understood rather than what the user actually wrote.

Last updated