Release-Troubleshooting-Guide
Stepping through a release build’s code in an IDE is often necessary when the release build is not behaving the same way as a profile or debug build.
Prerequisites
- You have already created the
.pakfiles needed for your game to run - You are using a ‘project-centric’ build. If you are using ’engine-centric’ you will need to provide the appropriate
-DLY_PROJECTS <project path>path in the CMake configure command.
Debugging a release game launcher (Windows + Visual Studio)
Configure your monolithic release build with the
O3DE_BUILD_WITH_DEBUG_SYMBOLS_RELEASEflag on so debug symbols are generated.cmake -S . -B build/windows_mono -DO3DE_BUILD_WITH_DEBUG_SYMBOLS_RELEASE=1 -DLY_MONOLITHIC_GAME=1Open the generated solution file in
build/windows_monoin Visual Studio, and ensure thereleasebuild configuration is selected.Set the startup project to
<project-name>.GameLauncherRight click on
<project-name>.GameLauncherand selectPropertiesto open the Project Properties window.Make sure the active configuration is
Active(release), then selectConfiguration Properties>Debuggingand modify theCommand Argumentsto provide a project path that is the absolute path to where the binaries will go. Optionally, set asys_pakPriority=2to make sure only.pakfiles are loaded.--project-path="$(TargetDir)" --sys_pakPriority=2This will ensure that the engine will look in this folder (and
build/windows_mono/release/bin/release/Cache/pc) for your game .pak files and won’t use theCachefolder in your project’s directory.Copy your
.pakfiles intobuild/windows_mono/release/bin/release/Cache/pc
Now you’re ready to build, run and attach the debugger to your game launcher. If you want to set breakpoints in the code you can do that now, or just run the launcher from Visual Studio and pause the program at any time to debug the code.
Use the Local Windows Debugger button or F5 to build and run your game launcher.
PRO Tip: Looking for missing .pak files? Set sys_report_files_not_found_in_paks to 1 so the launcher outputs a user\log\PakMissingAssets.log file that contains a list of missing assets. This may NOT list all missing assets because 3rd party gems may use their own asset loading code that looks for archives inside you .pak files and then opens those proprietary archives and looks for assets inside and that code may not report missing files like the regular engine asset loading code does.