Rewind debug capabilities

We have been using rewind debug for several months now, and the more we use it, the more we feel that we either don’t know how to use it very well, or that it doesn’t have the features we expect.

  • Rewind only displays some of the running StateTrees, and it still displays the completed StateTrees in the line as if they were active (with green color). If you look at the attached image, at that specific time, there are currently three nested StateTrees running. However, the image shows five, two of which are actually running. The third one is not visible in the image at all. Why is that?
  • If we understand correctly, StateTree is not capable of parallelization. So why is each StateTree in a separate line and not sequentially one after the other? Is there any possibility that several StateTrees could run at the same time? (I don’t mean nested StateTrees like in my image).
  • Rewind records absolutely all actors in the game. Is it possible to filter the recording to only include actors I select? I don’t mean filtering by type, but actually by my selection.
  • Is it possible to find an actor based on the StateTree that is running? We have examples where different NPCs run different StateTrees. However, there is currently no way to find these NPCs in Rewind, so we have to go through them all manually and check whether the NPC triggered that StateTree or not.
  • This may not be for Rewind, but it is currently the only working StateTree debugger, so I will ask the question here as well. Is there any way to insert a breakpoint into StateTree? We have situations where we just want to know if an NPC has passed through a given branch at a certain point in time, or check the order in which those StateTrees are triggered without having to search for which NPC triggers the StateTree and go through the timeline in a complicated way. If this option is not currently available, do you know how difficult it would be to implement it?

I apologize if there is already an answer to these questions in the documentation, but I was unable to find it.

[Attachment Removed]

Hi there, I’ll address these one by one:

1. This is possibly because the Rewind Debugger will only show traces from actors that have valid data within the timeframe that is shown by the rewinder. If you let the debugger play until those completed trees do not have any valid data within the current timeframe the should become unlisted in the debugger timeline. As for the missing tree, is it possible it’s being filtered out?

2. I might need some more context for what exactly you mean on this question. You could run another state tree in parallel to another using FStateTreeRunParallelStateTreeTask(s). They display as separate state trees in the rewind debugger (under the same source).

[Image Removed]

3. You can use the eyedropper tool to quickly specify an actor within the scene. The drop down list of the trace selector also has a category called “From Scene Selection” that contains a list of all currently selected actors.

[Image Removed]

4. You can get a specific actor that is using a state tree through the debugger window in the state tree asset. In 5.7 It is now mainly directing users to the Rewind Debugger but there remains a drop down list that contains all instances of that state tree in the current trace. Although if you have many actors running the same state tree it has the same problem with searching through the main trace selector in the rewind debugger.

[Image Removed]

5. You can insert breakpoints into a state tree. Right clicking on a state you can add a breakpoint on state enter and/or exit. You can also add breakpoints on individual tasks & transitions in a similar fashion through the item actions arrow. However the breakpoints seem to be a bit inconsistent at the moment. Breakpoints hit on the first instance of the state machine but tend to fail on following instances. You can get more reliable breakpoints using the original debugger. Which you can enable through Editor Preferences -> StateTreeEditor -> Enable Legacy Debugger Window. When using the original debugger they trigger consistently IF you have that instance of the state machine selected in the timeline.

[Image Removed] [Image Removed]

- Louis

[Attachment Removed]