Background for Skyrim SE

The Debug Script

    The Debug script is a part of Skyrim SE’s Papyrus scripting ecosystem. It is included with the base game.

    For this script, the Papyrus index knows about:

    • 31 functions


    Inheritance Tree

    No indexed scripts extend this script.

    Properties

    No properties found.

      Events

        No events found.

      Functions

      • voidfunctionCenterOnCell(stringasCellname)NativeGlobal

        Teleports the player to the specified cell. (Same as the CenterOnCell console command)

      • floatfunctionCenterOnCellAndWait(stringasCellname)NativeGlobal

        Teleports the player to the specified cell and does not return until they arrive.

      • floatfunctionPlayerMoveToAndWait(stringasDestRef)NativeGlobal

        Teleports the player to the specified reference and does not return until they arrive.

      • voidfunctionCloseUserLog(stringasLogName)NativeGlobal

        Closes the specified user log. If the log isn't open, it doesn't do anything. A subsequent call to Debug.OpenUserLog(...) will cycle the logs on disk (so log 0 becomes 1, 1 becomes 2, etc).

      • voidfunctionDebugChannelNotify(stringchannel, stringmessage)NativeGlobal

        Outputs the string to a named debug channel (useful on the Xenon currently)

      • voidfunctionDumpAliasData(QuestakQuest)NativeGlobal

        Dumps all alias fill information on the specified quest to the alias dump file. The dump files are stored in "<game folder>/Logs/Script/AliasDump".

      • stringfunctionGetConfigName()NativeGlobal

        Obtains the game's build configuration.

      • stringfunctionGetPlatformName()NativeGlobal

        Obtains the game's platform name.

      • stringfunctionGetVersionNumber()NativeGlobal

        Obtains the game's version number.

      • voidfunctionMessageBox(stringasMessageBoxText)NativeGlobal

        Displays a single-button OK message box containing the specified text.

      • voidfunctionNotification(stringasNotificationText)NativeGlobal

        Displays a notification in the top-left corner of the screen.

      • boolfunctionOpenUserLog(stringasLogName)NativeGlobal

        Opens a new user log on disk. This will also cycle the older logs (so log 0 becomes 1, 1 becomes 2, etc). The log files are stored in "My Documents/My Games/Skyrim/Logs/Script/User". If the log is already open, the function will return false (but not print an error to the main script log). Note that you do not have to close the log yourself unless you want to, it will close automatically when the game ends, the player goes back to the main menu, or a save is loaded.

      • voidfunctionQuitGame()NativeGlobal

        Immediately exits the game.

      • voidfunctionSetFootIK(boolabFootIK)NativeGlobal

        Turns foot IK on and off in the game.

      • voidfunctionSetGodMode(boolabGodMode)NativeGlobal

        Turns god mode on and off in the game.

      • voidfunctionSendAnimationEvent(ObjectReferencearRef, stringasEventName)NativeGlobal

        Sends an animation event to a reference directly.

      • voidfunctionStartScriptProfiling(stringasScriptName)NativeGlobal

        Starts profiling a single Papyrus script. Child and parent scripts are not profiled. The profile files are stored in "<game folder>/Logs/Script/Profiling". This will also cycle the older profiling logs (so log 0 becomes 1, 1 becomes 2, etc). If the script is already profiled nothing will change. Profiling requests are not saved and will be reset if you load a save game.

      • voidfunctionStartStackProfiling()NativeGlobal

        Starts profiling a single Papyrus stack until stopped or until the last function exits. The profile files are stored in "<game folder>/Logs/Script/Profiling". This will also cycle the older profiling logs (so log 0 becomes 1, 1 becomes 2, etc). If the stack is already profiled nothing will change. Profiling requests are not saved and will be reset if you load a save game.

      • voidfunctionStopScriptProfiling(stringasScriptName)NativeGlobal

        Stops profiling a single Papyrus script. Child and parent scripts are not affected. If the script is not being profiled nothing will change.

      • voidfunctionStopStackProfiling()NativeGlobal

        Stops profiling a single Papyrus stack. The profile files are stored in "<game folder>/Logs/Script/Profiling". This will also cycle the older profiling logs (so log 0 becomes 1, 1 becomes 2, etc). If the stack is not currently profiled nothing will change.

      • voidfunctionTakeScreenshot(stringasFilename)NativeGlobal

        Takes a screenshot (Xenon only)

      • voidfunctionToggleAI()NativeGlobal

        Toggles AI on and off in the game.

      • voidfunctionToggleCollisions()NativeGlobal

        Toggles collisions on and off in the game.

      • voidfunctionToggleMenus()NativeGlobal

        Toggles the display of menus on and off in the game.

        No menus are closed or opened, they are just made visible or invisible.

      • voidfunctionTrace(stringasTextToPrint, intaiSeverity=0)NativeGlobal

        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.

      • voidfunctionTraceStack(stringasTextToPrint="racing stack on request", intaiSeverity=0)NativeGlobal

        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).

      • boolfunctionTraceUser(stringasUserLog, stringasTextToPrint, intaiSeverity=0)NativeGlobal

        Outputs a string to the specified user log on disk, and the Papyrus debug text page. Returns true if the text was successfully output to the log.

      • voidfunctionTraceConditional(stringTextToPrint, boolShowTrace)Global

        Outputs a string to the Papyrus log on disk, and the Papyrus debug text page. But only if the condition is true.

      • voidfunctionTraceAndBox(stringasTextToPrint, intaiSeverity=0)Global

        Outputs a string to the Papyrus log on disk, the Papyrus debug text page, and pops up a message box with the same text.

      • voidfunctionShowRefPosition(ObjectReferencearRef)NativeGlobal

        Used to add a tripod to a reference (non-release builds only)

      • voidfunctionDBSendPlayerPosition()NativeGlobal

        Prints out the players position to the database (non-release PC and Xenon builds only)

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