I am trying to debug UE4.10.2 game project using Xcode 7.2. Stepping through code is not giving the value of variables correctly

Before stepping the code begins, I get the warning: “UE4Editor-QuickStart.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.”

I have tried using as Build Configuration both the “DebugGame Editor” and “Development Editor” and they both seem to be not storing debug information.

Is there a way for getting the debug information back? I am just looking to step through the code and examine values of the variables. This worked perfectly well in UE4.8.3 and Xcode 6.4

Hello ,

I can confirm that I’m getting the same message and behavior when trying to debug with XCode. While I’m not familiar with debugging on XCode as I’ve never tried it before, I’ll be looking into how to fix this. I’ll be sure to let you know as soon as I found out anything.

Thank you. I appreciate your looking into this!

It seems that with XCode, the commandline arguments are not changed by a config-by-config basis as they are with Visual Studio. This means that when you change to DebugGame or any configuration you wish to use, you’ll need to also add the “-debug” commandline argument.

After doing that, the message disappeared for me and I was able to see my variables’ values.

Thank you, that works like a charm!
For future users who may stumble onto this post, here is where the “-debug” needs to be added:

  1. Click on your project name on top-left of Xcode, then Edit Scheme. This opens up the configuration editor. By default the “Info” tab is open.
  2. Go to the “Arguments” tab.
  3. There is a field called “Arguments Passed on Launch” and it will be showing the path to .uproject file associated with your project. Double click on the path and insert -debug at the end.
    Example: “/Users/PCNAME/Documents/Unreal Projects/MyProject/MyProject.uproject” -debug