I was bashing my head against this issue for a while and finally found the solution in another forum post.
Turns out the debug configurations in ‘launch.json’ don’t properly escape backslash characters. After fixing this, I can now successfully debug engine code. Woohoo!
{
"name": "Launch PuzzlePlatformsEditor (DebugGame)",
"request": "launch",
"program": "C:\\Program Files\\Epic Games\\UE_5.0\\Engine\\Binaries\\Win64\\UnrealEditor-Win64-DebugGame.exe",
"preLaunchTask": "PuzzlePlatformsEditor Win64 DebugGame Build",
"args": [
"C:\\Users\\pres2\\git\\PuzzlePlatforms\\PuzzlePlatforms.uproject"
],
"cwd": "C:\\Program Files\\Epic Games\\UE_5.0",
"stopAtEntry": false,
"console": "externalTerminal",
"type": "cppvsdbg",
"visualizerFile": "C:\\Program Files\\Epic Games\\UE_5.0\\Engine\\Extras\\VisualStudioDebugging\\Unreal.natvis",
"sourceFileMap": {
"D:\\build\\++UE5\\Sync": "C:\\Program Files\\Epic Games\\UE_5.0"
}
},