-
Notifications
You must be signed in to change notification settings - Fork 19
Debugging
The Papyrus Language extension provides a runtime debugger for Skyrim Special Edition and Fallout 4 which will display live diagnostics on executing scripts and some game information.
The runtime Papyrus debugger is capable of pausing the game's execution at user defined breakpoints within Papyrus source code.
Within VS Code, these breakpoints are represented as solid red dots that are visible next to lines in source code. Breakpoints can be placed in bugged source code to pause the game at a given point.
As the game is running, you may run the attachDebugger
command to begin debugging.
When a breakpoint is reached the game will pause and begin to communicate with VS Code.
While the game is paused you may inspect loaded scripts, navigate the call stack, and view a script's properties & variables.
- Press
Control
+Shift
+P
to bring up the command palate. - Begin typing
papyrus
and execute thepapyrus.fallout4.installDebuggerSupport
command".
Before the attachDebugger
command is run, the Papyrus Language extension will prompt to automatically update the xSE plugin if necessary.
Optionally you may run the installDebuggerSupport
command to replace the xSE plugin files at any time.
- Launch the game.
- (Optionally) Configure the game for windowed mode to easily change focus between desktop windows.
- Once the game has launched, attach the VS Code debugger to the game's process. This can be done by one of the following ways.
- Open the VS Code Debug sidebar and click
Start Debugging
. - Press
Control
+Shift
+P
to bring up the command palate and executepapyrus.fallout4.attachDebugger
.
- Open the VS Code Debug sidebar and click
If you are debugging scripts that are compiled as part of a .ppj, you will need to add a debugging configuration (launch.json
) and specify projectPath
as the path to the .ppj file.
Once the debugger is attached to the game's process you will immediately be able to view any loaded scripts and all currently executing stacks.
The Papyrus Language extension provides some commands for debugger support.
Installs Papyrus debugging support for Fallout 4.
-
Command:
papyrus.fallout4.installDebuggerSupport
Attaches the Papyrus debugger to Fallout 4.
-
Command:
papyrus.fallout4.attachDebugger
Extension
Features
- Language Definition
- IntelliSense
- Code Navigation
- Refactoring
- Compilation
-
Debugging
- Debug View
- [Debug Console](Debug Console)
- [Assembly View](Assembly View)
Creation Engine
Language
Help