RSX Code Reference
    Preparing search index...

    Class Debug

    The Debug class provides various functionality relating to debugging and logging.

    Index
    • Parameters

      • OptionalisInternalConstructor: boolean

      Returns Debug

    traceOutputEnabled: boolean
    • get messageCount(): number

      Gets the number of new entries.

      Returns number

    • Removes all log entries.

      Parameters

      Returns void

    • Logs a new informative message to the global debug log.

      Parameters

      • message: any

        Message to log.

      • Optionalcategory: number

        Optional index of the category to group the message under.

      Returns void

    • Logs a new warning message to the global debug log.

      Parameters

      • message: any

        Message to log.

      • Optionalcategory: number

        Optional index of the category to group the message under.

      Returns void

    • Logs a new error message to the global debug log.

      Parameters

      • message: any

        Message to log.

      • Optionalcategory: number

        Optional index of the category to group the message under.

      Returns void

    • Logs a new message to the global debug log using the provided type.

      Parameters

      • message: any

        Message to log.

      • verbosity: EnumValue<LogVerbosity>

        Verbosity level defining message importance.

      • Optionalcategory: number

        Optional index of the category to group the message under.

      Returns void

    • Logs a new trace message to the global debug log.

      Parameters

      • message: any

        Message to log.

      • Optionalcategory: number

        Optional index of the category to group the message under.

      Returns void

    • Logs a new warning message to the global debug log.

      Parameters

      • message: any

        Message to log.

      • Optionalcategory: number

        Optional index of the category to group the message under.

      Returns void

    • Saves a log about the current state of the application to the specified location.

      Parameters

      Returns void

    • Uploads a single locally-stored crash report to the cloud crash-report endpoint.

      Posts to {baseURL}/crashReport — the same ingestion route the HTML editor shell uses for unhandled runtime crashes — so all crash reports converge on one route.

      Parameters

      • report: { contents: JsonObject; userInfo: string }

        The crash report to submit. contents is the raw crash log and userInfo is any additional info the user provided.

      • baseURL: string

        The cloud library service endpoint base URL; /crashReport is appended.

      • editorVersion: string

        The current editor/engine version string.

      • onSubmitted: (isSuccess: boolean) => void

        Invoked with true on a successful (2xx) upload, false otherwise.

      Returns void

    onLogEntryAdded: Event<[p0: Immutable<LogEntry>]>

    Triggered when a new entry in the log is added.

    Sim thread only.

    onLogEntriesRead: Event<
        [infoCount: number, warningCount: number, errorCount: number],
    >

    Triggered when a new entry were read.

    Sim thread only.

    onErrorLogEntryAdded: Event<[p0: Immutable<LogEntry>]>

    Triggered when a new error entry in the log is added.

    Error logs are also dispatched by onLogEntryAdded, this API helps to only surface error logs. Sim thread only.

    onLogCleared: Event<[]>

    Triggered when the log is cleared.

    Sim thread only.