Blog: Debugging Stately with Replay Node
In the example below, Mateusz Burzyński from Stately AI walks through the debugging process for this bug (opens in a new tab). 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 (opens in a new tab) and the video below!
Share your debugging success story with us and we’ll add it to our examples page! Contact us in Discord (opens in a new tab) or at support@replay.io.