Download

Viewing FString on debug mode for Mac OS

Hi there, I am able to debug and step through my UE4 C++ code on Xcode and Visual Studio Code with Mac OS, but when I try to watch an FString variable, I can’t see the contents. Instead I see something like this


On Windows there’s the UE4.natvis for Visual Studio. Is there something special you have to do to set up Unreal data formats with Mac OS? Please let me know! Thanks!

I found a solution, you need to make sure the UE4/Engine/Extras/LLDBDataFormattersUE4DataFormatters.py script gets called when Xcode compiles. According to the install instructions in that script:

  1. Open Terminal and run:
    touch ~/.lldbinit
    open ~/.lldbinit
  2. Add the following text to .lldbinit and save - modifying the path as appropriate:
    settings set target.inline-breakpoint-strategy always command script import "/Path/To/Epic/UE4/Engine/Extras/LLDBDataFormatters/UE4DataFormatters.py"

Then in Xcode you need to go to Product->Scheme->Edit Scheme

In the pop up window, make sure you are on “Run” on side menu and under the “Info” tab

Then tell Xcode where to look for your custom .lldbinit file

Now when you run DebugGame Editor, you can see Unreal data types in the Xcode debugger!