Skip to content

Debugging breakpoints broken after hot reload on the web #60186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
biggs0125 opened this issue Feb 20, 2025 · 3 comments
Open

Debugging breakpoints broken after hot reload on the web #60186

biggs0125 opened this issue Feb 20, 2025 · 3 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-dev-compiler web-hot-reload Issues related to stateful hot reload on the web

Comments

@biggs0125
Copy link

Handle re-registering breakpoints after a hot reload based on new code locations.

@biggs0125 biggs0125 added web-dev-compiler area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-hot-reload Issues related to stateful hot reload on the web labels Feb 20, 2025
srujzs added a commit to srujzs/webdev that referenced this issue Apr 4, 2025
…ed files, and publish 24.3.10

dart-lang/sdk#60186

Breakpoints are currently broken when doing a hot reload. They either
are not re-mapped or point to the wrong location. For now, we should
disable them in the changed libraries. In order to do this, we split
the hot reload implementation into 2 in order to get the list of changed
libraries. The call to hot reload will later use the cached list to
call out to the embedder.
srujzs added a commit to dart-lang/webdev that referenced this issue Apr 7, 2025
…ed files, and publish 24.3.10 (#2606)

dart-lang/sdk#60186

Breakpoints are currently broken when doing a hot reload when files change. They either are not re-mapped or point to the wrong location. For now, we should disable them in the changed libraries. In order to do this, we split the hot reload implementation into 2 in order to get the list of changed libraries. The call to hot reload will later use the cached list to call out to the embedder.

Note that this likely won't change any behavior. New JS files already don't have breakpoints, so this PR should be mostly about cleaning up bookkeeping.
@srujzs
Copy link
Contributor

srujzs commented Apr 7, 2025

dart-lang/webdev#2606 disables them on changed files for now. We're working on getting them working and reregistered still.

@bkonyi
Copy link
Contributor

bkonyi commented Apr 7, 2025

Handle re-registering breakpoints after a hot reload based on new code locations.

FWIW, the VM doesn't try and re-register breakpoints in changed libraries. It's up to the service clients to reset them after the reload completes.

@srujzs
Copy link
Contributor

srujzs commented Apr 7, 2025

FWIW, the VM doesn't try and re-register breakpoints in changed libraries. It's up to the service clients to reset them after the reload completes.

Agreed. We chatted about this, but DWDS still needs to send the right events for the client to do so. I've tried that (in combination with the expected pause), but the program doesn't resume so I need to debug further on where things are going wrong. And separately, the breakpoint mapping on files seems off so I'll need to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. web-dev-compiler web-hot-reload Issues related to stateful hot reload on the web
Projects
Status: In Progress
Development

No branches or pull requests

3 participants