TraceStack - Debug

From the CreationKit Wiki
Revision as of 15:27, 18 October 2011 by imported>Rhavlovick (1 revision: Clobber re-import by Henning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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. It also attaches a full callstack so you can see who called you (and who called them and so on).

Syntax

Function TraceStack(string asTextToPrint = "Tracing stack on request", int aiSeverity = 0) native global

Parameters

  • asTextToPrint: The text that should be printed to the log and text page.
    • Default: "Tracing stack on request"
  • aiSeverity: The severity of the trace statement. Info, the default, will show 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

None

Examples

; Outputs "Tracing stack on request" along with a full stacktrace to the log
Debug.TraceStack()


; Outputs "Tracing stack on request" along with a full stacktrace to the log, at error severity (colored red)
Debug.TraceStack(aiSeverity = 2)

See Also