Debugging on macOS, using dSYM files provided by UE4 installer.

I want to be able to use lldb, see full call stack and step into engine sources.
It works out of the box on Windows in with PDBs provided. But on macOS dSYMs are not loaded by lldb.

Of course it is possible to attach dSYM during the debugging session. Like this for example:

settings set target.source-map “/Users/build/Build/++UE4/Sync” “/Users/Shared/Epic Games/UE_4.23”
add-dsym “/Users/Shared/Epic Games/UE_4.23/Engine/Binaries/Mac/UE4Editor-Engine.dSYM”

But it’s quite tedious. Ideally all dSYMs should be loaded automatically.

After some googling I’ve found a good write up on the topic:
So I’ve modified ruby script from that article for the purpose of automation loading UE4 dSYMs by lldb.
Here is the link:…794af99caf181d

So what it does in a few words:
For every binary (.app or .dylib) inside “/Users/Shared/Epic Games/UE_4.23/Engine/Binaries/Mac” it creates a directory {binary_name}.dSYM.
Inside that directory it creates:

  • Property list file: {binary_name}.dSYM/Contents/Resources/{uuid}.plist
  • Symlink to actual dSYM: {binary_name}.dSYM/Contents/Resources/DWARF/{binary_name}.dSYM

After that files are created lldb loads dSYMs automatically and I can debug engine code.
I’ve tested this approach on 4.23 and 4.25.

So my question - does it all make sense? And what is the right approach?

P.S. I understand that building the engine from source also solves the discussed problem. The question is how to use symbols for debugging that are provided by UE4 installer.