# Behaviors Debug Window The **Behavior Debug** window can be opened from the [Tools](../../tools/) menu when [Developer Mode](../../../../introduction/sdk-overview/#developer-mode) is active, and the simulation is running (ie: a flight has been started). It is used primarily for debugging the different aspects of the `` XML element for an aircraft, but also contains information on many other things like the electrical system, or the fuel system. The window looks like this: {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/behaviours_1_main.png" alt="The Model Behaviors Debug Window" >}} ### Menu Items The top of the Behaviors Debug window has the following menus: #### General {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/general_1_main.png" alt="Behaviour Debug General Menu" >}} - ##### File From the file menu you have the option to Load a SimObject's XML into the [Behavior Viewer](../behaviours-debug/behavior-viewer), or to save a *compiled* version of the SimObject behaviors, as well as save the actions `action.db` of this SimObject. - ##### View From this option you can select one or more [Views And View Info](#views-and-view-info) to be shown. {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/behaviours_4_viewmenu.png" alt="The Different View Options" >}} Note that not all views are useful, and the editor will automatically hide those that are not relevant to the SimObject XML file currently being inspected. You can find all the information on each available view from the links below: - [Code Editor](../behaviours-debug/code-editor/) - [Inspector Side Bar](../behaviours-debug/behavior-tabs/#inspector--inspector-side-bar) - [Logs](../behaviours-debug/behavior-tabs/#logs) - [Inspector](../behaviours-debug/behavior-tabs/#inspector) - [Components](../behaviours-debug/behavior-tabs/#components) - [Animations](../behaviours-debug/behavior-tabs/#animations) - [Mouserects](../behaviours-debug/behavior-tabs/#mouserects) - [Material](../behaviours-debug/behavior-tabs/#material) - [Visibility](../behaviours-debug/behavior-tabs/#visibility) - [Updates](../behaviours-debug/behavior-tabs/#updates) - [VFX](../behaviours-debug/behavior-tabs/#vfx) - [Input Events](../behaviours-debug/behavior-tabs/#input-events) - [Variables](../behaviours-debug/behavior-tabs/#variables) - [Tooltips](../behaviours-debug/behavior-tabs/#tooltips) #### Options {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/options_1_main.png" alt="Behaviour Debug Options Menu" >}} - ##### Only Show User SimObject Model Instances When this option is selected, the [Global Filters](#global-filters) section will only show those files that are directly from the current package. - ##### Only Show Aircraft SimObjects When this option is selected, the [Global Filters](#global-filters) section will only show those files that are from aircraft currently active in the scene (both user and AI). #### Debug {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/debug_1_main.png" alt="Behaviour Debug Menu" >}} - ##### System From this menu you can open one of the following System Debug views: - [Electrical](../../../editors/simobject-editor/debug_info/electrical-system-debug/) - [Fuel](../../../editors/simobject-editor/debug_info/fuel-system-debug) - [Hydraulic](../../../editors/simobject-editor/debug_info/hydraulic-system-debug) - [ECS / Pneumatic](../../../editors/simobject-editor/debug_info/ecs-pneumatic-system-debug/)   - ##### ToolTip When this option is enabled, mousing over any of the interactable elements in a scene will show a debug "tooltip" with information about the object the mouse is hovering over, for example: {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/debug_3_tooltip.png" alt="An Example Of A Scene Debug Tooltip" >}} - ##### Interaction When this is enabled, all interactables will be highlighted in the scene with a red box and hovering over any of them will show some information about that interactable: {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/debug_2_interaction.png" alt="Example Of The Interaction Debug Overlay Enabled" >}} - ##### Full Pick Interaction This option will only be available when the **Interaction** option is enabled, and when this has also been enabled, the information shown when hovering over any interactable will include a list of all the nodes hit at the mouse location. #### Parser {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/parser_1_main.png" alt="Behaviour Debug Parser Menu" >}} This option is used to toggle on/off parameter logging. With this option enabled, the target instances XML parameters will be backed up the next time they are parsed giving you access to the Parameters view. To force this, you will need to reload the SimObject. {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} This option is only available for behaviors that are not compiled (ie: are not within the <CompileBehaviors> element). This is usually for legacy aircraft, or for when you are writing your own behaviors and have not yet replaced the <Behaviors> element with <CompileBehaviors>. {{< /callout >}} If debugging from a busy airport it's advised to also select the target SimObject in the drop-down to avoid parsing parameters of all behavior instances created after activating this option. #### History {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/history_1_main.png" alt="Behaviour Debug History Menu" >}} This menu item simply shows a list of the component history that you have checked previously. You can click on any of the components listed to be taken to that view instantly. #### About (?) {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/menus/about_1_main.png" alt="Behaviour Debug About Text" >}} This menu item shows information about the currently selected model behavior XML instance. Specifically it shows the name and version of the selected behavior instance, as well as the update times for the different components. #### Behavior Viewer Clicking the `Behavior Viewer` button will open the viewer tool that permits the examination of any model behavior XML file, regardless of the package that is currently open in the main Behavior Debug window. For more information please see here: - [Behavior Viewer](../behaviours-debug/behavior-viewer) ### Global Filters The filters at the top of the Behaviors Debug window can be used to select and filter the different package and XML files that will be available for debugging. #### SimObject {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/behaviours_2_containerfilter.png" alt="Example Of Different Containers In The Container Filter Section" >}} Here you can select which SimObject to inspect the files from. All the currently loaded SimObjects will be listed in the drop-down menu on the right for you to select. Should there be many SimObjects in the list, you can use the filter input on the left to narrow down the selection. Once you select a SimObject, you can then select the file to inspect from the **Files Filter**. #### File {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/behaviours_3_filefilter.png" alt="Example Of Different XML Files In The File Filter Section" >}} Once you have selected a SimObject from the **SimObject Filter** list, here you can select which XML file from that SimObject to inspect. All the available XML files will be listed in the drop-down menu on the right for you to select one from, and should there be many files in the list, you can use the filter input on the left to narrow down the selection. Once you select a file, the **Views** section will update with the relevant tabs for debugging the XML contents. ### Views And View Info {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/behaviours_5_views.png" alt="Some Of The Different View That Can Be Shown In The Editor" >}} The majority of the Behaviors Debug window is taken up with the different **Views** and the information associated with those views. You can switch between the different views by simply clicking on the view **Tab** at the top. You can also show or hide views using the [View Menu](#view) (note that not all views are relevant for all XML files, and the editor will automatically select the initial views based on the file being inspected the first time it is selected). For more information on the available views, please see here: - [Behavior Tabs](../behaviours-debug/behavior-tabs) ### Note On Dynamic Parameters When working with model behaviors you have the possibility to use [Dynamic Parameters](../../../../content-configuration/models/modelbehaviors/general-template-xml-properties#dynamicparameters). These may be shown in the Behaviors Debug as `'[uid]'_n` in the code views, for example: {{< image-center src="images/2_DevMode/menus/tools/behavior_debug/behaviours_9_dynamic.png" alt="Illustration Of Dynamic Parameters In The Debug Window" >}} However, if that is the case for you, you can force the editor to update and show the actual full generated parameter in the debug window by using the **right click** menu and selecting **Open in Code Editor**. This will force an update of the Behavior Debug tool, and show the generated value for the dynamic parameters.