# Inspect your game hierarchy and logs at runtime -- just press F8

**URL:** https://forum.castle-engine.io/t/inspect-your-game-hierarchy-and-logs-at-runtime-just-press-f8/468
**Category:** News
**Created:** [December 3, 2021, 4:27pm UTC](https://forum.castle-engine.io/t/inspect-your-game-hierarchy-and-logs-at-runtime-just-press-f8/468 "2021-12-03T16:27:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [December 3, 2021, 4:27pm UTC](https://forum.castle-engine.io/t/inspect-your-game-hierarchy-and-logs-at-runtime-just-press-f8/468/1 "2021-12-03T16:27:10Z")

</div>

| [![Castle Game Engine Inspector - Mousey glTF animation](https://castle-engine.io/wp/wp-content/uploads/2021/12/Zrzut-ekranu-z-2021-12-03-05-22-42-200x118.png)](https://castle-engine.io/wp/wp-content/uploads/2021/12/Zrzut-ekranu-z-2021-12-03-05-22-42.png "Castle Game Engine Inspector - Mousey glTF animation") |
| [![Castle Game Engine Inspector - Platformer](https://castle-engine.io/wp/wp-content/uploads/2021/12/Zrzut-ekranu-z-2021-12-02-17-00-12-200x118.png)](https://castle-engine.io/wp/wp-content/uploads/2021/12/Zrzut-ekranu-z-2021-12-02-17-00-12.png "Castle Game Engine Inspector - Platformer") |
| [![Castle Game Engine Inspector - Escape from the Universe](https://castle-engine.io/wp/wp-content/uploads/2021/12/Zrzut-ekranu-z-2021-11-30-15-19-26-200x113.png)](https://castle-engine.io/wp/wp-content/uploads/2021/12/Zrzut-ekranu-z-2021-11-30-15-19-26.png "Castle Game Engine Inspector - Escape from the Universe") |

_Initial version of this post said we use F12. We had to change this shortcut to F8 though, because when running the application in Delphi debugger on Windows — F12 breaks the process (this is a feature of Windows+Delphi…)._

I’m happy to announce a feature that may forever change how you use _Castle Game Engine_! Simply recompile your game with the latest engine version, press F8 and behold… a powerful tool to see your log and hierarchy of objects in the game.

Watch a presentation:

Yes, this looks effectively like a (very minimalistic) editor-at-runtime. It is cross-platform and automatically available for all your games. Invoke it at any point, and inspect (soon: even edit) the visible CGE objects (UI, transformations, scenes…).

Features:

- View the hierarchy of TCastleUserInterface and TCastleTransform at runtime (just like in [CGE editor](https://castle-engine.io/manual_editor.php))

- Select any component (by picking it from hierarchy, or hovering mouse over it with various “Auto-Select” options) to see its properties, updated in real-time

- View logs (each time you press F8, we show 10 last logs, and we’ll collect any more logs that will be submitted while the inspector is open)

- All panels (hierarchy, properties, profiler, log) can be hidden and shown independently

- Inspector opacity can be controlled, to better see your game content underneath. The current opacity and panels are remembered when you toggle inspector by F8 repeatedly.

- Powerful _frame profiler_ shows where do you spend most of the time each frame: update, render, physics, swap. It also shows FPS history.

- The key to invoke the inspector can be configured, you can also make it available in the release mode. By default, we assign `{$ifdef DEBUG} keyF8 {$else} keyNone {$endif}`.

Note: long time ago I had a plan for a different approach to “editor at runtime” : compile with `CASTLE_WINDOW_LCL` backend, and add LCL UI — reused between “editor at runtime” and actual CGE editor. Downside: it would work only on desktops. For Delphi devs, it would also mean that we need to compile the game with FPC too. Upside: It would be easier to support 100% of editor features. What is the ideal approach? We’ll see 🙂 For now we develop CGE editor using LCL, and in-game inspector using CGE UI, and we’ll see how these 2 approaches converge.
