Skip to content

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented Oct 8, 2025

Fixes dart-lang/sdk#61560

We rely on a pause within a hot reload to pause execution so that we can reregister breakpoints. However, the existing pause mechanism always sends a PauseInterrupted event, which then triggers the client to think this is a normal pause event and not an internal detail. Instead, we should have the ChromeProxyService signal to the debugger that this is an "internal pause" and therefore it should not send a regular pause event and should use a completer to signal the pause is done.

Tests are refactored and updated to correctly check for the events when reregistering breakpoints. Specifically, it checks no other events besides the expected ones are sent.

…ish 25.1.1

Fixes dart-lang/sdk#61560

We rely on a pause within a hot reload to pause execution so that
we can reregister breakpoints. However, the existing pause mechanism
always sends a PauseInterrupted event, which then triggers the
client to think this is a normal pause event and not an internal
detail. Instead, we should have the ChromeProxyService signal to
the debugger that this is an "internal pause" and therefore it should
not send a regular pause event and should use a completer to signal
the pause is done.

Tests are refactored and updated to correctly check for the events
when reregistering breakpoints. Specifically, it checks no other
events besides the expected ones are sent.
@srujzs srujzs requested a review from bkonyi October 9, 2025 03:55
Copy link
Collaborator

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but let's hold off on publishing right away (I'd like to also get #2694 into the next release).

@srujzs srujzs changed the title [DWDS] Don't send PauseInterrupted event during a hot reload and publish 25.1.1 [DWDS] Don't send PauseInterrupted event during a hot reload Oct 9, 2025
@srujzs
Copy link
Contributor Author

srujzs commented Oct 9, 2025

let's hold off on publishing right away (I'd like to also get #2694 into the next release)

Ack, I kept it as the latest wip release.

@auto-submit auto-submit bot merged commit 3ab8fca into dart-lang:main Oct 9, 2025
57 checks passed
bkonyi pushed a commit that referenced this pull request Oct 9, 2025
Fixes dart-lang/sdk#61560

We rely on a pause within a hot reload to pause execution so that we can reregister breakpoints. However, the existing pause mechanism always sends a PauseInterrupted event, which then triggers the client to think this is a normal pause event and not an internal detail. Instead, we should have the ChromeProxyService signal to the debugger that this is an "internal pause" and therefore it should not send a regular pause event and should use a completer to signal the pause is done.

Tests are refactored and updated to correctly check for the events when reregistering breakpoints. Specifically, it checks no other events besides the expected ones are sent.
bkonyi added a commit that referenced this pull request Oct 9, 2025
* [DWDS] Don't send PauseInterrupted event during a hot reload (#2695)

Fixes dart-lang/sdk#61560

We rely on a pause within a hot reload to pause execution so that we can reregister breakpoints. However, the existing pause mechanism always sends a PauseInterrupted event, which then triggers the client to think this is a normal pause event and not an internal detail. Instead, we should have the ChromeProxyService signal to the debugger that this is an "internal pause" and therefore it should not send a regular pause event and should use a completer to signal the pause is done.

Tests are refactored and updated to correctly check for the events when reregistering breakpoints. Specifically, it checks no other events besides the expected ones are sent.

* [ DWDS ] Expose `dtdUri` via `DebugConnection` (#2694)

This is needed to access the DTD instance spawned by DDS.

---------

Co-authored-by: Srujan Gaddam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hot Reload opens binding.dart at line 845 on every reload (no errors shown)
2 participants