Cannot find symbol in .PDB file when using development compiler configuration

I cannot find symbols in PDB file after added some member variables to engine code.

UE_DISABLE_OPTIMIZATION was using. Setting “development” compiler configuration.

How to resolve this problem without setting “debug/debuggame” compiler configuration?

Thanks.

[Image Removed]

​Checked by using WinDbg

Development

[Image Removed]

debug

[Image Removed]

​wish to be showed in development configuration.

重现步骤

Hi,

Normally, the compiler do not optimize out unused members. I suspect one of the following things:

  • WinGDB is using the wrong .pdb
  • You have a build issue/corrupted build where some .cpp were compiled with the old version of Tickable.h and some other were compiled with the new version of Tickable.h and the linker picked up one version.
  • Something I don’t understand…

You could try the following:

  • Delete the Intermediate folders in your build tree and rebuild the development target.
  • Delete the .pdb and regenerate them. I would simply delete the .pdb that WinGDB loads or use a program like Everything to index the files on your drive and spot a .pdb that could be outdated.
  • Add a function to log the value of our variables and call this function somewhere to be sure they are present.

Regards,

Patrick

Hi,

I don’t know why WinGDB would not show the members nor the configuration to look for. Did you check on somebody else machine? I tried in UE 5.5, Win64/Development target and VS debugger showed the members. I used MSVC tool chain i.e: 14.38 and Windows SDK 10.0.22621. They are the default for Windows.

1>Using Visual Studio 2022 14.38.33145 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).I tried Editor and Game config and both worked. Here a screenshot of standard UE 5.5 Lyra Game/Win64/Development along with the .rsp file. So you can check if that’s a compiler options.

[Image Removed]D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\Tickable.cpp.obj.rsp

"Runtime\Engine\Private\Tickable.cpp"
/FI"D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\PCH.Engine.h"
/FI"D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\Definitions.h"
/Yu"D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\PCH.Engine.h"
/Fp"D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\PCH.Engine.h.pch"
/Fo"D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\Tickable.cpp.obj"
/experimental:log "D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\Tickable.cpp.sarif"
/sourceDependencies "D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\Tickable.cpp.dep.json"
@"D:\UE_5.5\Samples\Games\Lyra\Intermediate\Build\Win64\x64\LyraGame\Development\Engine\Engine.Shared.rsp"
/d2ssa-cfg-question-
/Zc:inline
/nologo
/Oi
/FC
/c
/Gw
/Gy
/utf-8
/wd4819
/DSAL_NO_ATTRIBUTE_DECLARATIONS=1
/permissive-
/Zc:strictStrings-
/Zc:__cplusplus
/D_CRT_STDIO_LEGACY_WIDE_SPECIFIERS=1
/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1
/D_DISABLE_EXTENDED_ALIGNED_STORAGE
/Ob2
/d2ExtendedWarningInfo
/Ox
/Ot
/GF
/errorReport:prompt
/D_HAS_EXCEPTIONS=0
/DPLATFORM_EXCEPTIONS_DISABLED=1
/Z7
/MD
/bigobj
/fp:fast
/Zo
/Zp8
/we4456
/we4458
/we4459
/we4668
/wd4244
/wd4838
/TP
/GR-
/W4
/std:c++20
/Zc:preprocessor
/wd5054

Otherwise, my intuitions tells me that there is a .obj or .pch somewhere that got stuck. You could recompile without PCH and turn off Unity build from your BuildConfiguration.xml (https://dev.epicgames.com/documentation/en\-us/unreal\-engine/build\-configuration\-for\-unreal\-engine?application\_version\=5\.5\). Also, ensure you are not using a precompiled engine… (installed build). That’s obvious, but who knows, sometime, you might run with UAT and point it to a prebuilt engine because of hardcoded (and forgotten) parameters that you don’t use for debug configuration?

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	<BuildConfiguration>
		<bUseUnityBuild>false</bUseUnityBuild>
		<bUsePCHFiles>false</bUsePCHFiles>
 	</BuildConfiguration>
</Configuration>

Regards,

Patrick

Thank you for the suggestions. Unfortunately, I’ve given them all a try, but I’m still unable to generate the correct .PDB files. Could you advise what configuration settings might be affecting the engine’s code generation for symbol?