Aliases

  • debug.traceback

Arguments

string
The message or diagnostic prefix.

Returns

string
The Byte-formatted stack trace, including the optional prefix.
Also accepts traceback(thread, message). The global function uses Stack Begin/Stack End and honors setstackhidden; it has no start-level parameter. The registered debug.traceback field is subsequently replaced when the host debug table is copied, so use global traceback for this Byte contract. The host table version can have different arguments and formatting. Related types: Debug types & behavior.

Example