Running uncooked content DebugGame

I am running engine v 4.10 (latest) with Xcode 7.2 (latest).

I tried to build DebugGame scheme from Xcode for my ue4 project, but it gave me an error about running uncooked content. Thus. I opened the project through the command line (by locating and running it with my .uproject), but when I try to cook (File > Cook Content for Mac), it tells me an error about “Missing UE4Game binary”. Does anyone know how to resolve this issue? Should I not use DebugGame, but use DebugGame Editor, Development, or Development Editor Xcode schemes? Should I post error logs from the attempted cook?

I get exactly the same error.

If I use DebugGame Editor (instead of DebugGame), it appears there is some optimization happening due to which I am unable to track variable values in Xcode. The Xcode gives this warning " UE4Editor-$PROJECTNAME.dylib was compiled with optimization - stepping may behave oddly; variables may not be available."


I am having a similar problem. When I try to run DebugGame Editor, Xcode launches the UE4 editor instead of launching the game. When building with DebugGame, it tries to launch the game, but fails on not finding cooked content.

Message - (The global shader cache file ‘/Users/Shared/UnrealEngine/4.10/Engine/GlobalShaderCache-GLSL_150_MAC.bin’ is missing.

Your application is built to load COOKED content. No COOKED content was found; This usually means you did not cook content for this build.
It also may indicate missing cooked data for a shader platform(e.g., OpenGL under Windows): Make sure your platform’s packaging settings include this Targeted RHI.

Alternatively build and run the UNCOOKED version instead.

So I tried to build and run uncooked from UE4 editor. This worked. So I did “Refresh Xcode project” and tried running from Xcode. Still get the above message.

So then, I selected “Cook content for Mac” opting in UE4 editor. This appeared to work. But I still cannot launch the game from Xcode.

I want to launch from Xcode, as it appears to be the only way to debug your game.

Any help would be appreciated.

Did some further digging. According to this JIRA ticket - - this is a known issue and the workaround is to launch the app with -opengl commandline option. I tried it and it does not work for me.

This issue was resolved in a different post:

Hi Gillsguitar,

I am still stuck. After adding the -debug flag and -game flag, I can build and run my game from Xcode, but no breakpoints are triggering (except if I break in the constructor for my actor). Also, I cannot see any of my log messages. Really badly stuck without debug support.

Change your target to “DebugGame Editor”. Make sure you have added the “-debug” flag at the right place. See my comments in the post 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 - Debugging, Optimization, & Profiling - Unreal Engine Forums

Hi gillsguitar,

So I managed to figure out my issue. Looking over other posts, I saw that folks are able to see GEngine->AddOnScreenDebugMessage() messages printed to the viewport in the first person shooter game. So I decided to run that tutorial and discovered that I had missed out a crucial set up step (I blame the other C++ programming tutorials I ran). You have to override the default GameMode object with the one you own and configure. This means creating your own GameMode object and setting it as the default game mode in UE4 (well explained in FPS game tutorial). When i did these, I was also able to see on screen debug messages - as well as other UE_LOG messages I was trying to print. So now I am on my way to - hopefully - weightier problems.

Thanks for hanging with me and trying to help out - appreciate it.