SplitScript reference / Debug
Debug
capability
capability Debug
Produces an unambiguous structural representation of a value.
String and char values are quoted and escaped. Source records and enums derive a multiline representation recursively when every contained value implements Debug. Standard-library containers opt into the same conditional derivation for their element or payload types.
Every Debug value also implements Display. A custom Display.toString remains the user-facing representation, while Debug.debugString controls how a value appears inside another derived value.
Examples
Preserve quotes around nested text
let checkpoints = ["forest", "castle"]
print(checkpoints)
Requires
| Member | Description | Available through |
|---|---|---|
| Display | Supports conversion to a user-facing textual representation. |
Implemented by
| Member | Description | Available through |
|---|---|---|
| FileVersion | A four-part numeric Windows executable version. | |
| None | Stores the single unit value None. | |
| String | Stores ordinary immutable UTF-8 text in WebAssembly GC memory. | |
| address | Stores a process address. | |
| bool | Stores a boolean value. | |
| char | Stores one Unicode scalar value. | |
| f32 | Stores a 32-bit floating-point number. | |
| f64 | Stores a 64-bit floating-point number. | |
| i16 | Stores a 16-bit signed integer. | |
| i32 | Stores a 32-bit signed integer. | |
| i64 | Stores a 64-bit signed integer. | |
| i8 | Stores an 8-bit signed integer. | |
| u16 | Stores a 16-bit unsigned integer. | |
| u32 | Stores a 32-bit unsigned integer. | |
| u64 | Stores a 64-bit unsigned integer. | |
| u8 | Stores an 8-bit unsigned integer. |
Methods
| Member | Description | Available through |
|---|---|---|
| debugString | Converts the receiver to its unambiguous structural representation. |