SplitScript reference / Debug / debugString

Debug.debugString

Method

T.debugString() -> String where T: Debug

Converts the receiver to its unambiguous structural representation.

User records and enums receive a recursive derived implementation when this method is absent. Defining an exact method with this signature overrides that representation without changing the user-facing Display.toString method.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Customize nested diagnostics

state "example.exe" {}

record Checkpoint {
    name: String,
}

fn Checkpoint.debugString() -> String {
    return `Checkpoint({self.name})`
}