Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
quick:debug [2018/05/29 14:49]
pedro
quick:debug [2020/09/03 11:28] (current)
pedro
Line 1: Line 1:
 +<markdown>
 # Debug Mode Quick Start Guide # Debug Mode Quick Start Guide
  
Line 12: Line 13:
 The Behavior Bricks editor enters debug mode automatically when playing a scene in the Unity editor, substituting the `Behavior` tab of the Behavior Bricks editor with the `Debug` tab, as shown in the Figure: The Behavior Bricks editor enters debug mode automatically when playing a scene in the Unity editor, substituting the `Behavior` tab of the Behavior Bricks editor with the `Debug` tab, as shown in the Figure:
  
-{{ :images:debug:debug.png }}+![]( :images:debug:debug.png )
  
 To watch the execution flow for a particular behavior tree of a given entity in the scene, you must open the behavior tree in the Behavior Bricks editor, and select the entity to debug in the Unity´s `Hierarchy` panel. Alternatively, the entity can be selected in the `Debug` tab, by first clicking on the `Refresh List` button and then clicking on the entity name. The `Debug` tab shows a list of the entities in the scene being played which contain a `Behavior Executor` component, grouped by the behavior assigned, as shown in the Figure: To watch the execution flow for a particular behavior tree of a given entity in the scene, you must open the behavior tree in the Behavior Bricks editor, and select the entity to debug in the Unity´s `Hierarchy` panel. Alternatively, the entity can be selected in the `Debug` tab, by first clicking on the `Refresh List` button and then clicking on the entity name. The `Debug` tab shows a list of the entities in the scene being played which contain a `Behavior Executor` component, grouped by the behavior assigned, as shown in the Figure:
  
-{{ :images:debug:debug_entity.png }}+![]( :images:debug:debug_entity.png )
  
 Once the behavior and the entity have been selected, the state of each node is depicted by changing the color of its bounding box: Once the behavior and the entity have been selected, the state of each node is depicted by changing the color of its bounding box:
Line 25: Line 26:
 - Grey when in suspended state (`Repeat` and `Priority Selector` in the Figure) - Grey when in suspended state (`Repeat` and `Priority Selector` in the Figure)
  
-{{ :images:debug:colors.png }}+![]( :images:debug:colors.png )
  
 From the `Debug` tab is also possible to pause the execution of an entity behavior by clicking on the `Pause` button next to the entity name. Keep in mind that the pause will start after it finishes its current task. Once you have pressed the pause button you can either `Resume` the behavior or `Tick` it so the behavior receives one update call and then return to pause. From the `Debug` tab is also possible to pause the execution of an entity behavior by clicking on the `Pause` button next to the entity name. Keep in mind that the pause will start after it finishes its current task. Once you have pressed the pause button you can either `Resume` the behavior or `Tick` it so the behavior receives one update call and then return to pause.
  
-{{ :images:debug:pause.png }}+![]( :images:debug:pause.png )
  
 It is also possible to pause and resume all the entities that use a given behavior by pressing the corresponding `Resume all` or `Pause all` button. It is also possible to pause and resume all the entities that use a given behavior by pressing the corresponding `Resume all` or `Pause all` button.
Line 37: Line 38:
 While in debug mode it is possible to inspect the value of the parameters of a running tree or the parameters of a particular node in a running tree. The `Blackboard` tab shows the parameters of the selected tree in a given entity (previously selected in the `Debug` tab): While in debug mode it is possible to inspect the value of the parameters of a running tree or the parameters of a particular node in a running tree. The `Blackboard` tab shows the parameters of the selected tree in a given entity (previously selected in the `Debug` tab):
  
-{{ :images:debug:watch_node.png }}+![]( :images:debug:watch_node.png )
  
 and for a running tree, by clicking on one of its node it is possible to inspect the node parameters: and for a running tree, by clicking on one of its node it is possible to inspect the node parameters:
  
-{{ :images:debug:watch_blackboard.png }}+![]( :images:debug:watch_blackboard.png )
  
 ### Breakpoints ### Breakpoints
Line 49: Line 50:
 In order to set a breakpoint you just need to right click in a node and select `Add Breakpoint`, and this can be done while in edit or play mode of the Unity editor: In order to set a breakpoint you just need to right click in a node and select `Add Breakpoint`, and this can be done while in edit or play mode of the Unity editor:
  
-{{ :images:debug:breakpoint_add.png }}+![]( :images:debug:breakpoint_add.png )
  
 Then, in the `Node` tab, it is possible to select the event(s) triggered by the node that will make the breakpoint to have effect: Then, in the `Node` tab, it is possible to select the event(s) triggered by the node that will make the breakpoint to have effect:
  
-{{ :images:debug:breakpoint.png }}+![]( :images:debug:breakpoint.png )
  
 Finally, for the breakpoint to have effect, the scene has to be played, an entity containing the tree with the breakpoint has to be selected in the `Debug` tab, and the behavior tree has to be opened in the Behavior Bricks editor (it is not required it to be in the active tab of the editor). When the breakpoint is reached, the execution of the scene will be paused. Finally, for the breakpoint to have effect, the scene has to be played, an entity containing the tree with the breakpoint has to be selected in the `Debug` tab, and the behavior tree has to be opened in the Behavior Bricks editor (it is not required it to be in the active tab of the editor). When the breakpoint is reached, the execution of the scene will be paused.
Line 59: Line 60:
 A node with a breakpoint may be in three possible states: inactive with some event selected (left), inactive with none event selected (middle), active (right) A node with a breakpoint may be in three possible states: inactive with some event selected (left), inactive with none event selected (middle), active (right)
  
-{{ :images:debug:breakpoint_state.png }} +![]( :images:debug:breakpoint_state.png )
  
 +</markdown>