Trace - Debug
(Redirected from Trace (Papyrus))
Jump to navigation
Jump to search
Member of: Debug Script
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.
Syntax[edit | edit source]
Function Trace(string asTextToPrint, int aiSeverity = 0) native global
Parameters[edit | edit source]
- asTextToPrint: The text that should be printed to the log and text page.
- aiSeverity: 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.
- Default: 0 (Info)
- The following values are acceptable:
- 0: Info
- 1: Warning
- 2: Error
Return Value[edit | edit source]
None
Examples[edit | edit source]
; Output "Hello World" to the log
Debug.Trace("Hello, World!")
; Output "Hello World" to the log at error severity
Debug.Trace("Hello, World!", 2)