r.FASTBuildController.SendSCWDebugSymbols
r.FASTBuildController.SendSCWDebugSymbols
#Overview
name: r.FASTBuildController.SendSCWDebugSymbols
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable when distributed shader compiler workers crash.\n0: Do not send along debug information in FASTBuild. \n1: Send along debug information in FASTBuild.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.FASTBuildController.SendSCWDebugSymbols is to control whether debug information is sent along with FASTBuild for distributed shader compiler workers when they crash. This setting is part of the FASTBuild controller system, which is likely used for optimizing build processes in Unreal Engine 5.
This setting variable is primarily used in the FASTBuild Controller plugin, specifically in the FastBuildUtilities module. It’s directly related to the shader compilation process and debugging of distributed shader compiler workers.
The value of this variable is set through the Unreal Engine console variable system. It’s initialized to 0 by default, meaning debug symbols are not sent along with FASTBuild by default.
The associated variable SendWorkerApplicationDebugSymbols interacts directly with r.FASTBuildController.SendSCWDebugSymbols. They share the same value, with SendWorkerApplicationDebugSymbols being the actual int32 variable used in the code logic.
Developers must be aware that enabling this variable (setting it to 1) will increase the amount of data sent during FASTBuild operations, which could impact build times and network usage. It should only be enabled when debugging shader compiler worker crashes is necessary.
Best practices for using this variable include:
- Keep it disabled (0) during normal development to maintain optimal build performance.
- Enable it (1) only when investigating shader compiler worker crashes in a distributed build environment.
- Remember to disable it after debugging is complete to avoid unnecessary overhead.
Regarding the associated variable SendWorkerApplicationDebugSymbols:
The purpose of SendWorkerApplicationDebugSymbols is to serve as the actual int32 variable that controls whether debug symbols are sent for shader compiler workers in FASTBuild operations.
This variable is used within the FastBuildUtilities module of the FASTBuild Controller plugin. It directly influences the behavior of the WriteShaderWorkerDependenciesToFile function, which is likely responsible for preparing files for FASTBuild operations.
The value of SendWorkerApplicationDebugSymbols is set by the console variable system through r.FASTBuildController.SendSCWDebugSymbols.
When SendWorkerApplicationDebugSymbols is true (1), additional debug information (PDB files on Windows) for the ShaderCompileWorker is included in the build process. This can significantly increase the amount of data processed and transferred during builds.
Developers should be aware that enabling this variable will impact build times and resource usage, especially in large projects or on slower networks.
Best practices for using SendWorkerApplicationDebugSymbols include:
- Use it in conjunction with r.FASTBuildController.SendSCWDebugSymbols, as they are directly linked.
- Enable it only when necessary for debugging shader compiler issues in a distributed build environment.
- Be prepared for increased build times and data transfer when this variable is enabled.
- Consider the impact on build infrastructure and network resources when enabling this feature in a team environment.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/FastBuildController/Source/Private/FastBuildUtilities.cpp:14
Scope (from outer to inner):
file
namespace FASTBuildControllerUtilitiesVariables
Source code excerpt:
int32 SendWorkerApplicationDebugSymbols = 0;
FAutoConsoleVariableRef CVarFASTBuildSendDebugSymbols(
TEXT("r.FASTBuildController.SendSCWDebugSymbols"),
SendWorkerApplicationDebugSymbols,
TEXT("Enable when distributed shader compiler workers crash.\n")
TEXT("0: Do not send along debug information in FASTBuild. \n")
TEXT("1: Send along debug information in FASTBuild."),
ECVF_Default);
#Associated Variable and Callsites
This variable is associated with another variable named SendWorkerApplicationDebugSymbols
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/FastBuildController/Source/Private/FastBuildUtilities.cpp:12
Scope (from outer to inner):
file
namespace FASTBuildControllerUtilitiesVariables
Source code excerpt:
namespace FASTBuildControllerUtilitiesVariables
{
int32 SendWorkerApplicationDebugSymbols = 0;
FAutoConsoleVariableRef CVarFASTBuildSendDebugSymbols(
TEXT("r.FASTBuildController.SendSCWDebugSymbols"),
SendWorkerApplicationDebugSymbols,
TEXT("Enable when distributed shader compiler workers crash.\n")
TEXT("0: Do not send along debug information in FASTBuild. \n")
TEXT("1: Send along debug information in FASTBuild."),
ECVF_Default);
int32 SendAllPossibleShaderDependencies = 1;
#Loc: <Workspace>/Engine/Plugins/FastBuildController/Source/Private/FastBuildUtilities.cpp:45
Scope (from outer to inner):
file
function void FastBuildUtilities::WriteShaderWorkerDependenciesToFile
Source code excerpt:
FDependencyEnumerator ModulesDeps = FDependencyEnumerator(ScriptFile, TEXT("ShaderCompileWorker"), TEXT(".modules"));
IFileManager::Get().IterateDirectoryRecursively(*FPlatformProcess::GetModulesDirectory(), ModulesDeps);
if (FASTBuildControllerUtilitiesVariables::SendWorkerApplicationDebugSymbols)
{
#if PLATFORM_WINDOWS
FDependencyEnumerator PdbDeps = FDependencyEnumerator(ScriptFile, TEXT("ShaderCompileWorker"), TEXT(".pdb"));
IFileManager::Get().IterateDirectoryRecursively(*FPlatformProcess::GetModulesDirectory(), PdbDeps);
#endif
}