EventStore.UI icon indicating copy to clipboard operation
EventStore.UI copied to clipboard

Debugging a projection does not update state

Open hayley-jean opened this issue 2 years ago • 0 comments

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:

  1. Create a projection with the following code:
fromStream("test-stream")
.when({
	$init: function(s) {
		return { count: 0 }
	},
	$any: function(s) {
		s.count++;
	}
})
  1. Open the debug screen for the projection
  2. Open the dev tools for your browser
  3. From another window/application, write an event
  4. Check that the event appears in the debug view on the left
  5. 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.
  6. Step through the projection code until the event has been handled. The state is not updated.

EventStoreDB version: >= 21.10.2.

hayley-jean avatar Jun 28 '22 14:06 hayley-jean