How do I get debugging information when diagnosing crashes in Unreal 4.27 on macOS?

I’m using the macOS version of Unreal 4.27.

I come from working with other engines written in C++, and I am unsure how to do in-depth debugging with tools like Xcode or lldb, with source lines and local variables and everything else. When I do run into crashes, I get a crash log, which somewhat helps, but not being able to make heads of tails of the backtrace with lldb is significantly hampering my attempts to debug the game. This is even more troublesome because sometimes I only get crashes in a packaged build, not in the editor.

When I create a package, I get a dSYM out the other end, but I’m not sure how to translate the dSYM into full debugging information in a debugger. I’ve tried doing the obvious thing of attempting to load it from inside lldb and point to my source tree, but lldb still gives me nonsense.

If I instead attempt to launch the game directly from the Xcode project, I get an error message about missing cooked resources, and when I provide them from another build I get a crash that isn’t the same crash I’m trying to diagnose that also doesn’t have any locals or source mappings, leading me to believe that not even the Xcode project sets things up properly.

Any advice?

You should install Visual Studio community which is properly supported by UE. Then install the Engine version’s symbols. After that you can attach Visual Studio to the UE4 editor process and get detailed debug info, also you can walk through breakpoints in both your project’s source code and the engine source code.

On macOS, the only options appear to be Xcode, VIsual Studio Code, and CLion. Visual Studio for Mac is not supported, and I’ve had issues in the past building the Unreal editor when I had Mono installed, a necessary prerequisite.

I’ve successfully built the Xcode project before, but what it builds is not a packaged build, one that is broken out of the box due to missing assets, and even if you work around that issues, I still only get lldb backtraces with function names, no variable names or source listings. In fact, the only Xcode builds that do work are editor builds, and those don’t exhibit the same problems that packaged builds do.

Maybe someone else knows more about the macOS options, I avoid Apple products and do not know how well it supports Visual Studio. What you tell me about XCode is that it is broken as well.