I’m using “DebugGame Editor” build. The file exists “Binaries\Win64\UE4Editor-HeroQuest-Win64-DebugGame.pdb”. But when I attach to process and try to set a C++ breakpoint in my C++ code, I get “No symbols have been loaded for this document”.
Update: I can even set breakpoints in the UE4 engine code, but not in my own UE4 project.
Update: I tried reinstalling ue 4.25.1, repairing vs2019, and doing a fresh git clone of my project, but no luck. My teammate is able to set breakpoints, so it’s not an issue with our game’s git repo I guess.
Thanks for the hint with the pdb file location. The fix for me was to run the debugger as you did, and then in VS go to Debug > Windows > Modules, and look for my project dll (UE4Editor-YourProject-Wing64-DebugGame.dll), right-click on it select load symbols, and manually select the pdb file.
I think the source of the issue has something to do with my project being in a mounted folder (I mapped an older drive to C:\Slowdrive and put my UE project there). When I was in the debug modules window I saw that some where located in C:\SlowDrive… and some were in \Device\HarddiskVolume5…, so I think the build is getting confused between the two.
just FYI, you don’t normally need to run the editor in Debug mode. It will slow to a crawl. Maybe useful if you are deep in the engine debugging stuff, but normally Development Editor is plenty for daily use. If you want to exclude a particular file from optimization so you can set breakpoints anywhere, wrap the cpp file with #pragma optimize like so: