← Debug output

Debug.log

luastra/debug
Debug.log(...: any): nil

Emits a development diagnostic at the ordinary log level, serializing the supplied values through the host's bounded debug channel. It has no role in application state or user-visible status.

Before you use it

Add luastra/debug to this module's dependencies in luastra.json, then import it with require("luastra/debug"). No additional host capability is required. Keep user-visible errors in UI state rather than relying on a developer console.

How it fits

The call writes a synchronous development diagnostic. It neither changes application state nor throws merely because the error log level is used.

When to use it

Use Debug.log for temporary progress, state-transition, and correlation diagnostics during local development. Remove noisy calls before release and never include credentials, tokens, personal data, or complete sensitive payloads.

Parameters

ParameterType / valuesDescription
...anyChecked ... argument accepted by Debug.log.

Returns

nil — the exact nil value declared by the SDK contract.

What happens next

A prefixed diagnostic appears in the active host's development log.

Failures and fixes

Never include secrets or personal data. Logging is not telemetry, recovery, or user-facing error handling, and host presentation may differ.

Availability

Public-source alpha diagnostic API in 0.5.0-alpha.

Focused example

local Debug = require("luastra/debug")
Debug.log("game", "round started")

Complete inventory

View all pages in Debug output
Next: Debug.warn →