Xcode: SCons and native debugging
External builds, executable selection, project arguments and breakpoints.
This guide uses Xcode as a front end for SCons and native LLDB. It does not replace Reckfell build scripts or provide C# debugging. See building for macOS for dependencies and managed-build preparation.
Build from a terminal first
The working directory is Source, alongside SConstruct. For a native Apple silicon editor:
command -v scons
scons platform=macos target=editor arch=arm64 dev_build=yes debug_symbols=yes -j4On Intel, replace arch=arm64 with arch=x86_64; see the build guide for renderer and SDK limitations. The expected base-configuration output is bin/reckfell.macos.editor.dev.arm64; extra modules and options change suffixes. Select the actual output file, not the old tools.64 name. If SCons fails in a terminal, resolve its diagnostics before changing Xcode settings.
External build
Create a project with an External Build System target if your Xcode version offers that template. Keep the auxiliary .xcodeproj outside the source tree. Configure:
| Field | Value |
|---|---|
| Build Tool | The absolute path returned by command -v scons. A shell alias is not an executable. |
| Directory | The absolute Source path containing SConstruct. |
| Arguments | platform=macos target=editor arch=arm64 dev_build=yes debug_symbols=yes -j4, or your working configuration. |
A GUI application may have a different PATH from your terminal. If Python, SCons or SDK lookup fails, check absolute paths and the selected Xcode. Do not create another ordinary compile target that builds every engine .cpp with Xcode defaults: it lacks the correct SCons generated headers, modules and defines.
Source navigation and a successful build are separate results. If the indexer reports errors in working code, check include paths, defines and generated headers for the same configuration. SCons can generate compile_commands.json for tools that support it:
scons platform=macos target=editor arch=arm64 dev_build=yes debug_symbols=yes compiledb=yes compiledb_gen_only=yesThis generates a command database; it does not replace a build. Having the JSON does not mean Xcode imported it or completion is fully configured.
Launch and breakpoint
In Xcode scheme settings, select the actual Source/bin executable for Run, enable Debug executable, and add separate arguments: --editor, --path, and the absolute project directory. That directory must contain project.reckfell; pass the directory, not the file. Remove --editor to run the game.
The equivalent editor launch for the configuration above is:
./bin/reckfell.macos.editor.dev.arm64 --editor --path "/absolute/project"This is a native build without C#. For a C# project, use the prepared configuration and its executable from the macOS build guide. A hard link under a new name is unnecessary: the scheme should launch the fresh file for the correct architecture. Inside a .app, the executable is Contents/MacOS/Reckfell.
Set a breakpoint at the start of main in platform/macos/reckfell_main_macos.mm. Success means stopping in that file with local data available, not merely seeing a game window. For denied attachment, see macOS debugging. For unresolved breakpoints, check architecture, symbols and source/binary correspondence.
These settings were checked against Reckfell 1.0.0 source. The native Xcode interface, indexing, Mac compilation and LLDB were not run in this review.