Background for Skyrim SE
Member of the Debug script
voidfunctionTrace(stringasTextToPrint, intaiSeverity=0)NativeGlobal

Description

Wiki Description

Outputs a string to the Papyrus log on disk, and the Papyrus debug text page. The Papyrus log file is located in Documents\My Games\Skyrim\Logs\Script\Papyrus0.log, but only if bEnableTrace and bEnableLogging are set to 1 in the Papyrus section of the Skyrim.INI, SkyrimPrefs.INI or a plugin's INI.

Documentation Comment

Outputs the string to the log
Severity is one of the following:
0 - Info
1 - Warning
2 - Error


Parameters

  1. stringasTextToPrint

    CK Wiki Description

    The text that should be printed to the log and text page.

  2. intaiSeverity=0

    CK Wiki Description

    The severity of the trace statement. Info, the default, shows up as green; warnings will show up as yellow; and errors as red; in the Papyrus debug text page.

    • The following values are acceptable:* 0:Info
      • 1:Warning
      • 2:Error

Examples

; Output "Hello World" to the log
Debug.Trace("Hello, World!")
; Output "Hello World" to the log at error severity
Debug.Trace("Hello, World!", 2)

Auto-Generated Example

string myString__asTextToPrint
int myInt__aiSeverity

Debug.Trace(myString__asTextToPrint, myInt__aiSeverity)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.