Skip to content

Restore breakpoints after hot reload #305

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

Closed
stevemessick opened this issue Oct 14, 2016 · 10 comments
Closed

Restore breakpoints after hot reload #305

stevemessick opened this issue Oct 14, 2016 · 10 comments

Comments

@stevemessick
Copy link
Member

When the Hot Reload button is clicked the code on the selected device is updated but the breakpoints are lost for that device. If multiple devices are connected only the breakpoints on the reloaded device are lost. The breakpoint locations are not changing in this case (I just changed one character in a string to test that). This needs to be solved by the IDE since the daemon has no information about breakpoints.

@stevemessick
Copy link
Member Author

Oddly, doing a full app restart seems to preserve breakpoints.

@devoncarew
Copy link
Member

Yeah, we'll need some API changes to enable us to preserve (or re-set) breakpoints during a hot reload.

@stevemessick
Copy link
Member Author

Can't we just use the observatory, as we already do to set and unset them? I'm actually wondering why the breakpoints do not get lost on a restart. Maybe the daemon should be doing something different, and this isn't even an IDE issue. @danrubel could that be the case?

@devoncarew
Copy link
Member

devoncarew commented Oct 14, 2016

The resolution from issue #273 will help us out. I think the steps will be:

  • we send in reloadSources(pause: true) via the daemon protocol
  • the VM reloads; we get a new event type back (kPausePostRequest)
  • on receipt of that event, we should manually restore all previous breakpoints

@eseidelGoogle
Copy link

FYI @johnmccutchan

@devoncarew
Copy link
Member

This is currently blocked on flutter/flutter#6890 (a crash in the runtime).

/cc @johnmccutchan, @turnidge I see this crash on both the iOS simulator and with Android devices.

@johnmccutchan
Copy link

flutter/flutter#6890 is fixed.

@devoncarew devoncarew modified the milestones: 0.1.6, On Deck Dec 5, 2016
@mit-mit mit-mit modified the milestones: 0.1.8, On Deck Dec 13, 2016
@devoncarew
Copy link
Member

PR for the Dart plugin out here: JetBrains/intellij-plugins#457

@devoncarew
Copy link
Member

This is in progress in the Dart plugin; moving it out of the 0.1.8 milestone.

@devoncarew devoncarew modified the milestones: On Deck, 0.1.8 Jan 9, 2017
@devoncarew
Copy link
Member

This has landed in both the Flutter and Dart plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants