-
Notifications
You must be signed in to change notification settings - Fork 566
How to set up a Debug Development Build
Atomic development builds can be used to work on the Atomic Game Engine itself as well as when debugging Atomic C++ projects.
If you're primarily interested in trying out or testing the latest features, please see Building Atomic The Quick and Easy Way for a simpler method to compiling the engine.
Jump to:
-
XCode - It is possible to use XCode, though a guide needs to be written. Hint:
./CMake_XCode.sh
in the root of the repository with XCode and CMake installed and then open the generated project
Before we can build the engine, we need to clone the repository recursively. To do this, you must have git
installed. To clone the repository, use this command:
git clone --recursive https://github.com/AtomicGameEngine/AtomicGameEngine
Install Visual Studio
You may either install Visual Studio 2015 or 2017 - they can both be downloaded from https://www.visualstudio.com/downloads/.
-
Make sure to install the C++ compiler and optionally the C# tools and Xamarin for mobile development
-
For VS2015, you also need CMake installed which can be downloaded from https://cmake.org/download/. In the installer, make sure you allow it to add itself to
PATH
Configure the project
Open cmd
and change directory to the root of the repository you just pulled down:
cd C:\Users\User\path_to_repository
Now, type in CMake_VS2015.bat
or CMake_VS2017.bat
depending on the version of Visual Studio you have.
When it's finished, it'll have created a new folder for you in the same location as the root repository folder. If this is not the case, see CMake Issues. From here, open Atomic.sln
with Visual Studio.
Once the solution is prepared for you, set AtomicEditor
as the startup project.
Build the solution by navigating to Build > Build Solution
or using F6
.
Start debugging
Once the build is complete, open the source file you want to debug and set a breakpoint by clicking on a line of code in the left gutter.
Now, you can start debugging the project by navigating to Debug > Start Debugging
or using F5
.
Visual Studio should now start debugging the engine. Once the breakpoint has been hit, you'll be able to inspect variables and view the callstack.
Debugging a C++ Atomic Project
You can also debug an Atomic project by launching the editor in player mode. To do so, navigate to the project properties and add the --player
and --project
flag followed by the absolute path to your project. Ensure that you have loaded the project at least once into the editor first, to generate the cache.
These instructions can be used to setup a development build on macOS and Linux.
Install QtCreator
First, install QtCreator, which can be downloaded from https://www.qt.io/download/. (You may install it without a runtime, since it won't be necessary in this case)
Configure the project
Open QtCreator and select File > Open File or Project
.
Navigate to the root of the repository you just pulled down, and open CMakeLists.txt
.
At this point, leave everything as-is and click Configure Project
.
Wait until QtCreator is finished setting up the project for you. Now, in order to speed up compilation time, navigate to Project > Build Steps
and add the -j4
argument.
Start debugging
Select Debug
and choose Atomic Editor
in the lower left of QtCreator.
Build the project by navigating to Build > Build All
or using CMD
/CTRL + SHIFT + B
.
Navigate to whatever file you'd like to debug and create a breakpoint by clicking a line of code in the left gutter.
Finally, you can start debugging the engine by navigating to Debug > Start Debugging
or using F5
.
QTCreator should start debugging for you, and once the breakpoint has been hit, you will be able to inspect variables and view the callstack.
Debugging a C++ Atomic Project
You can also debug an Atomic project by launching the editor in player mode. To do so, select the Project
tab on the left and under the Run
settings, add the --player
and --project
flag followed by the absolute path to your project. Ensure that you have loaded the project at least once into the editor first, to generate the cache.
Home | Copyright (c) 2014 - 2017 THUNDERBEAST GAMES LLC