Skip to content
Permalink
Browse files
Avoid endElement parsing callbacks when debugger is paused.
Previously it would emit an event that would pop the maintained stack
so when a breakpoint was hit the subsequently fetched stacktrace
was missing the breakpoint.

Fixes #90.
  • Loading branch information
arosien authored and Shanedell committed Mar 12, 2022
1 parent 11a8ea5 commit c35fae30515f4c0652ab506977e4614178f47dc6
Showing 1 changed file with 2 additions and 1 deletion.
@@ -795,7 +795,8 @@ object Parse {

override def endElement(pstate: PState, processor: Parser): Unit =
dispatcher.unsafeRunSync {
events.offer(Some(Event.EndElement(pstate.copyStateForDebugger)))
control.await *> // ensure no events while debugger is paused
events.offer(Some(Event.EndElement(pstate.copyStateForDebugger)))
}
}

0 comments on commit c35fae3

Please sign in to comment.