Skip to content

Debugging a projection does not update state #328

@hayley-jean

Description

@hayley-jean

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions