diff --git a/lib/instrumenter/src/instrumenter.ts b/lib/instrumenter/src/instrumenter.ts index 4b8253cd3548..86b5f64cc4b1 100644 --- a/lib/instrumenter/src/instrumenter.ts +++ b/lib/instrumenter/src/instrumenter.ts @@ -133,6 +133,9 @@ export class Instrumenter { this.channel.on(STORY_RENDER_PHASE_CHANGED, ({ storyId, newPhase }) => { const { isDebugging } = this.getState(storyId); this.setState(storyId, { renderPhase: newPhase }); + if (newPhase === 'preparing' && isDebugging) { + resetState({ storyId }); + } if (newPhase === 'playing') { resetState({ storyId, isDebugging }); }