EventStore.UI
EventStore.UI copied to clipboard
Debugging a projection does not update state
The state of the projection is not updated correctly when stepping through a projection to debug it. When running the projection normally without debugging, the state is updated as expected.
To reproduce:
- Create a projection with the following code:
fromStream("test-stream")
.when({
$init: function(s) {
return { count: 0 }
},
$any: function(s) {
s.count++;
}
})
- Open the debug screen for the projection
- Open the dev tools for your browser
- From another window/application, write an event
- Check that the event appears in the debug view on the left
- Click
Run Step
. The debugger in the dev tools will break just before the event handler code, and you can use the dev tools debugger to step through the handler. - Step through the projection code until the event has been handled. The state is not updated.
EventStoreDB version: >= 21.10.2.