Skip to content

Conversation

@devoncarew
Copy link
Contributor

@devoncarew devoncarew commented Jul 21, 2017

This happens when a flutter_tools client - typically an IDE - requests a reload with the pause-after-reload flag set. This gives IDEs a chance to re-set breakpoints for the new scripts before the isolate starts executing again. In this case, we still want to request a reassemble of the app; the IDE client will resume the isolate, and without the reassemble, the hot reload is performed, but the app UI doesn't update.

@devoncarew
Copy link
Contributor Author

@a-siva, could you or @B3rn475 review? I think this is a result of fixing the PausePostRequest event handling.

Copy link
Contributor

@B3rn475 B3rn475 left a comment

Choose a reason for hiding this comment

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

I do confirm the missed reassemble and that the change fixes it.

LGTM

comment changes to kick the appveyor bot
@devoncarew devoncarew merged commit a92a627 into flutter:master Jul 21, 2017
goderbauer added a commit that referenced this pull request Jul 24, 2017
@johnmccutchan
Copy link
Contributor

This will make it difficult to set breakpoints in build methods. It will also expose the developer to an indeterminate state of which breakpoints are still active.

@B3rn475
Copy link
Contributor

B3rn475 commented Jul 25, 2017

Due to dart-lang/sdk@ba5fe22 when editors request sourceReload with pause: true.

  • If the application was idle, it reloads the source code and pauses, the reassemble request gets queued in the VM, the editor has time to reset all the requested breakpoints and send the resume command when they are all in place. The reassemble is executed.
  • If the application was at a breakpoint, it reloads the source code and still pauses, the reassemble request gets queued in the VM, the editor has time to reset all the requested breakpoints and will not send the resume command when they are all in place, remaining at the same breakpoint. The reassemble will remain in the queue till the stack empties.

Before dart-lang/sdk@ba5fe22 the isolate was resuming in both pause: true and pause: false situations #10934

IntelliJ due to good timing was still able to reset breakpoints.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hot reload button didn't perform hot reload

4 participants