-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Breakpoints should be re-established on hot restarting an app #52794
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
Comments
/cc @aam @rmacnak-google |
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? |
//cc @derekxu16 |
DWDS is using the Chrome DevTools Protocol
|
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. |
Breaking this issue out from flutter/devtools#5265
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
.This isn't affecting web apps. DWDS re-establishes breakpoints here: https://github.com/dart-lang/webdev/blob/8360d50ff889f3c0f817d4d48d3aebd71345cf5d/dwds/lib/src/services/chrome_proxy_service.dart#L280-L283, the VM service should so something similar.
The text was updated successfully, but these errors were encountered: