-
Notifications
You must be signed in to change notification settings - Fork 341
Debugger page fails to auto-open main.dart
when connected to web app
#5350
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
I know why this is happening:
The other option is to have DevTools try to find the |
Unfortunately this is tricky - in dwds we set the rootLib of the VM incorrectly to the wrapper of the main since we don't know what is the correct one. One of the solutions we were thinking about is adding build metadata (constructed by the build, or frontend server in this case) to send all kinds of useful information to dwds (including main module, main module to show in the debugger, locations of dill files, compilation flags etc) For now we can think of hacking it somehow - if we have an easy way to detect the main module in flutter tools, just pass it as a parameter to dwds? But I am not sure if we do. I think this should be possible - flutter tools creates a bootstrap to start the main wrapper, is we can find what created the wrapper we can find the main:) Starting point would be: |
Note: Also investigated how to sort the scripts shown to the user when they open their file search. Started making changes in dart-lang/webdev@master...elliette:sort-scripts, but I think it will also require DevTools changes. |
This was fixed in dart-lang/webdev#2047 |
When DevTools is connected to a web app, the debugger page auto-opens the Flutter bootstrap file, instead of the app's
main.dart
file:We should make sure the debugger page opens the
main.dart
file instead of this bootstrap file, which is the intended behavior.However, there is also the question of discoverability of the file search bar. Instead of loading
main.dart
, we could default to showing a page that tells the user how to open a file. See dart-lang/webdev#2010The text was updated successfully, but these errors were encountered: