Flow Graph Debugger

Overview

The Flow Graph Debugger enhances the integrated Flow Graph Editor for debugging any given Flow Graph in a Visual Studio kind of style.

It is possible to add so called Breakpoints to any input or output Port of a given Flownode.

Once an input or output Port with an added Breakpoint will be triggered by the Flowsystem the game will be paused, the Flow Graph Editor opens the correct Flow Graph and it will center the Flownode in the Flow Graph View:

Enable Debugging

To enable debugging click on the "Bug" button in the Flow Graph Editor toolbar:

Adding/Removing Breakpoints

To add a new Breakpoint either press [CTRL] + [Middle Mouse] on a specific Port or right-click on it to get the Port context menu and choose Add Breakpoint:

To remove an existing Breakpoint either press [CTRL] + [Middle Mouse] again or choose Remove Breakpoint from the context menu.

It is also possible to directly remove all Breakpoints for a specific Flownode or Flow Graph by using the context menu options:

  • Remove Breakpoints for Node
  • Remove Breakpoints for Graph
Note

Certain context menu options are grayed out if they are not available. For example if a Port already has a Breakpoint the option Add Breakpoint will be grayed out and if no Breakpoint exists it will gray out the Remove Breakpoint option.

Once a Breakpoint was added it will show a red dot next to the input or output Port:

Enabling/Disabling Breakpoints

It is always possible to Disable or Enable specific Breakpoints through the context menus of the Flownode Port or the Breakpoint Overview:


Using Tracepoints

Every Breakpoint can be turned into a Tracepoint, which instead of pausing the Game will output the information about a triggered Breakpoint to the console and log file.


Console output example:

[TRACEPOINT HIT - FrameID: 71054] GRAPH: AnimObject1 (ID: 96) - NODE: Entity:MaterialParam (ID: 5) - PORT: ValueColor - VALUE: 0.867136,0.005522,0.005522

Breakpoints Overview

To give a better overview about all added Breakpoints the Flowgraph Editor now has a new Treeview in the bottom right corner (by default):

If you click on one of the Tree view items it will open the Flow Graph and if a Flownode or Port item was clicked it will also select and center the Flownode in the view.

With a right-click on one of the Tree view items it is possible to remove a specific Breakpoint, remove all Breakpoints for a Flownode or all Breakpoints for a specific Flow Graph.

Resume the Game

To resume the game, once a Breakpoint was hit, either press [F5] (Flowgraph Editor must have the focus) or click on the Play button in the Flowgraph Editor toolbar:

Basic Example

In this example we are using a basic Flow Graph which should calculate a random number once the [R] key was pressed.

The advantage with using the Flow Graph Debugger is that you can actually see the calculated random number without any overhead of adding a debug message Flownode by simply adding 2 Breakpoints for each output Port:

If we now go in-game and press the [R] key the first Breakpoint will be hit and you can see the calculated random number in the Breakpoints overview in the bottom right:

If we press [F5] or the Play button from the toolbar the second Breakpoint will be hit:

If we press [F5] or the Play button from the toolbar again the game will be unpaused.