This page applies to SPT version
4.0
4.0.0 or newer (guide was tested and verified with SPT 4.0.2)\BepInEx\config\BepInEx.cfg\EscapeFromTarkov_Data\boot.configUnityPlayer.dllWinPixEventRuntime.dll (if it exists)\EscapeFromTarkov_Data\boot.config file is set to Read-Only. Otherwise, the changes to it might get overwritten on game start.\user\launcher\config.json file and open it in a text editor (Notepad++ recommended)."WinPixEventRuntime.dll" to the string array setting "ExcludeFromCleanup". Ex.: "ExcludeFromCleanup": ["WinPixEventRuntime.dll"],Debug in the top bar, and then Attach to Process (Unity).... Then, select the EscapeFromTarkov.exe process from the list.Debug -> Windows -> Modules -OR- Ctrl+Alt+U and search for the assembly you need.File -> Open... -OR- Ctrl+O (see Notes and Tips section 6).That’s it! Keep reading for some notes on debugging oddities and how to work around them.
If you’re getting an error about a missing “WinPixEventRuntime.dll” when starting the game, please make sure you properly set the SPT Launcher’s config to not delete the necessary DLL file on game start.
If the game is not appearing in the Unity process list in dnSpy, please double-check and make sure that your “boot.config” file has the Read-Only flag set. If it doesn’t, then the game will have overwritten it’s contents and you’ll need to replace the file from the downloaded archive again.
If the game fails to load properly, such as by getting stuck in the loading screen - please check the BepInEx logs and see if any of the SPT plugins failed to load. The Unity development build has some extra checks in place that might produce errors which are not present when running the regular version of EFT. If such a scenario occurs, then please contact me and let me know about the issue!
If the game crashes with strange errors when attempting to start it, then it’s possible that the prepared archive’s DLLs are outdated and EFT has had an engine update since this guide was written. Please go to Chapter 4 and try to create your own Development Build files.
With the development build enabled, if any client-side errors occur, a Unity debugging console will appear. These errors can usually be ignored, and the console itself can be closed safely. Some client mods might generate a constant stream of errors, preventing the console from being dismissed - in that case I recommend temporarily removing such mods.
Currently, Mono debugging might have an issue with the “Step-Over” function, which can cause it to behave in unexpected ways. I would recommend avoiding it and instead adding breakpoints to upcoming code lines that you want to inspect, instead of stepping over.
When a breakpoint is hit, all game threads are frozen, including the renderer. This causes the game window to freeze and will prevent minimizing the game in any way. This is easiest to mitigate by having more than one monitor, so you can keep the dnSpy window on a monitor separate from the game to avoid issues.
Game performance and load times are expected to be slower than usual, due to debugging builds being more performance-intensive. I would not recommend for anyone to play the game casually with the debugging build active.
If an assembly was added to the Assembly Explorer in dnSpy before the game process was attached, no debugging symbols may be loaded and breakpoints may not work. That’s why I generally recommend clearing the workspace before starting.
Any DLLs that are patched with preloader patches in BepInEx will be dumped to \BepInEx\DumpedAssemblies\EscapeFromTarkov when using the recommended BepInEx config (included in the prepared archive). Keep this in mind if you’re trying to manually add assemblies into the workspace.
To return the game to a regular, non-development build, simply restore the files you had backed up previously.
Go to the Unity Download Archive and download the Unity Editor version that matches EFT’s current engine version. You can find out which exact version is needed by checking the game’s UnityPlayer.dll file version in the Details tab. You do not need any additional build support installers. Alternatively, you can use the Unity Hub to download the correct editor version.
\Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_development_monoUnityPlayer.dll and WinPixEventRuntime.dll over to your game directory. Please backup any files before overwriting!\EscapeFromTarkov_Data\boot.config file and add the following line: player-connection-debug=1. Make sure to set the file to Read-Only mode after editing it!\BepInEx\config\BepInEx.cfg file and apply the following changes:
HarmonyBackend value to cecilDumpAssemblies value to trueLoadDumpedAssemblies value to trueInitial guide on how to convert EFT into a debug build and debug it: dnspy Wiki on GitHub
Additional information for loading game assemblies in dnSpy with BepInEx: BepInEx documentation
Archive for Unity Editor versions, from which the prepared archive of 2022.3.43f1debugging DLLs was created: Unity Download Archive