-
Notifications
You must be signed in to change notification settings - Fork 321
debug
Armory has an integrated debug console that displays some basic information about the scene, its objects, the performance and graphics information in realtime. It also enables you to temporarily change some settings directly from inside the running game.
To enable it, activate Armory Project > Flags > Debug Console
. You must enable Zui at Armory Project > Modules > Zui > [Auto or Enabled]
in order for this option to be available. If the debug console is enabled, it will show up in the upper right corner when the game starts. You can drag the debug console around by clicking on its top border.
There are 3 tabs, you can click on them to open the corresponding view:
-
The
Scene
tab displays information about the scene and its objects. You can select objects and scenes by clicking on them in the outliner. If an object is selected, theProperties
panel will show some basic information about the object like its transform values, its traits and depending on the object type even more values. Some of them are editable.Every trait has its own debug view that is freely draggable like the debug view itself. You can enable it by clicking on
Details
on the right side of the trait in the trait list. When opened, it remains pinned until closed again, so you can open multiple trait views at once. To close the debug view, click onClose Trait View
.The trait debug view shows some basic information about the trait (its class name + path, its superclass and the object/scene name) and under
Attributes
, it displays the full list of trait attributes in realtime. This can replace some annoyingtrace()
calls in your code. -
This panel displays information about the performance of your game. You can see the overall frame time and the time required by individual parts of the engine.
This panel shows some statistics related to the scene drawing.
Here you can see all current render targets in realtime.
The list of cached materials.
The list of cached shaders.
-
This panel allows you to run basic Haxe expressions from inside the game.
This panel shows the console output. Especially handy on macOS and Linux operating systems because you don't have to run Blender from the console to see its output. On Windows, you can toggle the Blender console by using
Window > Toggle System Console
.To clear the log view, press
Clear
.
To close the debug view again, you can click on the fourth "hidden" tab left to the Scene
tab.
Click Armory Project - Kode Studio
to open the bundled integrated development environment. Kode Studio is based on Visual Studio Code and comes preconfigured for Kha-based projects.
Armory project can be launched directly from Kode Studio by pressing F5
. Kode Studio contains debug support for Krom and lets you place breakpoints.
When compiling to one of the C targets, native project files are generated. This makes it easy to debug and profile Armory projects in Visual Studio or XCode IDE.
For graphics debugging, check out RenderDoc.
- Install from https://renderdoc.org/.
- For full access to the shader sources inside of RenderDoc, go to Armory's preferences and enable
Show Advanced > Developer Settings > Set Khamake Flag: --debug
. - Export to
Windows (Krom)
,Linux (Krom)
ormacOS (Krom)
. You can also debug games exported for the C target, but you will need to configure RenderDoc manually after you compiled the game's executable. - Press
Publish
and wait until the game is published. - Click on the down arrow in the sidebar of the export target list and choose
Open in RenderDoc
:
- Hit
Launch
in RenderDoc to start debugging!