You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Breakpoints should be re-established on hot restarting an app #52794
For VM apps, hot-restarting an application causes the breakpoints to disappear. That's because the pre-existing breakpoints aren't set on the isolate we get back from the call to getIsolate.
For VM apps, hot-restarting an application causes the breakpoints to disappear.
The "restart" functionality isn't part of Dart itself, it's a flutter functionality. But maybe flutter tools could request the list of existing breakpoints, then does restart and then make the same breakpoints again.
How does DWDS deal with changes to the source that make the previous breakpoint locations incorrect or arbitrary, especially in cases when the source changes are substantial?
I don't think it is a good idea for the VM to try and automatically re-establish breakpoints after a hot-restart, the sources could have changed in manner that makes it hard to map existing breakpoints back to appropriate locations in the new source base. The IDE tools (editors) have better context of this should be able to do a better job. As suggested in one of the comments above it probably makes sense for the tools to get the existing breakpoints and then map them to appropriate locations after the changes and re-establish the breakpoints after a restart.
Activity
mkustermann commentedon Jun 27, 2023
/cc @aam @rmacnak-google
mkustermann commentedon Jun 27, 2023
The "restart" functionality isn't part of Dart itself, it's a flutter functionality. But maybe flutter tools could request the list of existing breakpoints, then does restart and then make the same breakpoints again.
a-siva commentedon Jun 27, 2023
How does DWDS deal with changes to the source that make the previous breakpoint locations incorrect or arbitrary, especially in cases when the source changes are substantial?
a-siva commentedon Jun 27, 2023
//cc @derekxu16
elliette commentedon Jul 6, 2023
DWDS is using the Chrome DevTools Protocol
Debugger.setBreakpointByUrlAPI method, which persists breakpoints across page reloads.a-siva commentedon Jul 6, 2023
I don't think it is a good idea for the VM to try and automatically re-establish breakpoints after a hot-restart, the sources could have changed in manner that makes it hard to map existing breakpoints back to appropriate locations in the new source base. The IDE tools (editors) have better context of this should be able to do a better job. As suggested in one of the comments above it probably makes sense for the tools to get the existing breakpoints and then map them to appropriate locations after the changes and re-establish the breakpoints after a restart.