Skip to content

Thad writes blogs

this is a lot more work than i expected

Menu
  • About
  • Pin Posts
Menu

Compile and Debug Unreal Engine C++ with VS Code on macOS

Posted on October 30, 2024October 30, 2024 by Thad

In this post I will go through the steps needed to set up a development environment for working on Unreal C++ projects on macOS using VS Code. Specifically, I will set up UE 5.4.4 on macOS 14 (Sonoma).

Blueprint Only projects work out-the-box on macOS. Just download the Epic Launcher, go through any account set up steps, and install the engine. Set up for C++ projects can be a bit more complex, and the toolchain versions need to match exactly, or you’ll get an “The following modules are missing or built with a different engine version” error pop up.

To compile C++ for UE 5.4.4 you need to use Xcode 14. You can download old versions of Xcode from the Apple developer resources: https://developer.apple.com/xcode/resources/

Xcode 14, however, won’t open on Sonoma. Once you’ve downloaded the archive and unzipped it, rename the package Xcode_14.app and copy it to your Applications folder. It can sit there alongside the current version of Xcode, should you need that for other work.

From there, right-click the Xcode_14.app file and choose Show Package Contents, and run the Unix Executable found here: /Applications/Xcode_14.app/Contents/MacOS/Xcode

This will do some set up, and launch Xcode 14, from there go to the Xcode settings and select the command line tools for Xcode 14. You can now close Xcode and open your Unreal project. It should work.

See: https://stackoverflow.com/questions/77528170/can-i-run-unreal-5-3-with-xcode-15-on-mac-sonoma

To set VS Code as your C++ editor you need to open Editor Preferences. If you are used to Unreal on Windows, it’s not in the usual location. On macOS the Editor Preferences are here:

The go to: General → Source Code → Source Code Editor.

Then Tools → Generate Visual Studio Code Project, and Open Visual Studio Code.

In VS Code install the C/C++ VS Code extension from Microsoft  and the C# Dev Kit for Visual Studio Code.

Next install an LLVM debugger. I chose CodeLLDB (it is also a VS Code extension).

To build: Terminal → Run build Task

To launch with debugger attached: Run & Debug → Launch (Game)Editor Development (or DebugGame)

It’ll halt during start up on 1st run. It’s not a crash. Disable “breakpoint on C++ throw” in debugger UI (bottom left, breakpoints panel) and continue (F5).

You should now be able to build and debug your C++ code for UE5. To debug engine code, you need to install and fix-up the debug symbols.

Install the debug symbols and source code through the Epic Games Launcher Options for the engine version (down arrow next to launch) check the Engine Source and Editor symbols for debugging checkboxes, and then go here: https://jasont.co/debug-unreal-on-mac — there is a Ruby script to download from github, and instructions on how to modify it to your specific unreal version, install dependancies, and run it to fix the source-paths. I wont duplicate those instructions here.

Hopefully I’ve not missed anything, and that this is useful! Good luck and have fun with Unreal on your macOS device!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • October 2024
  • January 2023
  • December 2022
  • November 2022

Categories

  • Food
  • meta
  • Uncategorized
© 2025 Thad writes blogs | Powered by Minimalist Blog WordPress Theme