-
Notifications
You must be signed in to change notification settings - Fork 82
unable to view variables when debugging a flutter web app in IntelliJ #965
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
This is something we should address - this means you essentially can't debug a flutter web app in IntelliJ. |
cc @grouma |
What's the workflow for using a custom version of |
Answered on another channel, but essentially add a local path dep in |
Some addition, in case it might be helpful for debugging or workaround: I debugged this a bit during trying out expression evaluation, not sure what triggers it on the IDE side, maybe evaluating 'this' in the main scope? Basically, the debugger is failing to find the libraryId because objectId parameter in the method below with the following callstack and parameters:
which causes
I suspect that the same or similar issue causes the error in the variables window in VSCode: |
Dug a little deeper on this. The problem is that we have a don't yet have a way to properly translate frames and scopes from Javascript to dart - the current translation is heuristic-based and largely relies on JavaScript code being close to dart code. In this particular case, we give 'this' as an available variable in the top main scope, which should not be there at all because it does not exist in dart. VSCode seems to be getting the variables in a slightly different way from IntelliJ, so it is able to display 'this' but not its fields. Permanent solution will take some time as it will require information from the frontend server to have proper dart representation of frames and scopes in the debugger: For now, I will work on a temporary workaround (adjust of filtering of the scope) to unblock debugging in IntelliJ and make the 'this' variable disappear in VSCode. |
Thanks for the investigation! |
DWDS update includes a bug fix where native JavaScript objects are not included in list of variables avaiable in scopes. The bug was causing the IntelliJ dart extension to throw exception while trying to show 'this' varible in static functions, and VSCode dart extension to diplay the native javascript objects with error fields inside. See: dart-lang/webdev#965
@devoncarew published dwds and updated flutter (flutter/flutter#56958) |
Thanks! |
We get an exception when trying to populate the variables view:
The text was updated successfully, but these errors were encountered: