Blog: Debugging Stately with Replay Node

In the example below, Mateusz Burzyล„ski from Stately AI walks through the debugging process for this bug. To investigate, he uses replay-node, which records a Node runtime without the browser to debug after the fact.

The debugging process

In this issue, the function interpreter.state.can() always returns false when interpreting state stored as a JSON string in a DB. In the video and accompanying replay, you can see that this issue is caused because the machine property on the state is undefined when interpreting.
Mateusz traces the value of machine across multiple functions to identify why it is returning undefined. He uses multiple Replay features to trace and ultimately find the source of the bug:
  • Call stack to navigate between called functions
  • Stepping back, over, and into functions to isolate specific moments in time during execution
  • Navigating between instances of a function call
  • Hovering over source code to inspect values at that point in time
  • Evaluating expressions in the console
Check out the replay here and the video below!
Share your debugging success story with us and weโ€™ll add it to our examples page! Contact us in Discord or at support@replay.io.