Skip to content
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

[DAP] Support for assigning an inspected widget to a variable #54715

Open
elliette opened this issue Jan 24, 2024 · 1 comment
Open

[DAP] Support for assigning an inspected widget to a variable #54715

elliette opened this issue Jan 24, 2024 · 1 comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. dds-dap DDS issues related to the Debug Adapter Protocol (DAP) implementation pkg-dds For issues related to the Dart Development Service

Comments

@elliette
Copy link
Contributor

When using the Widget Inspector in Flutter DevTools, from the console you can assign the inspected widget to a variable and then perform expression evaluation on that variable:

Screenshot 2024-01-23 at 4 39 01 PM

(Note this was added by @polina-c in flutter/devtools#5542)

It would be nice to offer the same support when debugging from VS Code, etc. I don't see any way to assign an inspected widget to a variable:

Screenshot 2024-01-23 at 4 42 46 PM

FYI @DanTup

@elliette elliette added the dds-dap DDS issues related to the Debug Adapter Protocol (DAP) implementation label Jan 24, 2024
@lrhn lrhn added area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. pkg-dds For issues related to the Dart Development Service labels Jan 24, 2024
@DanTup
Copy link
Collaborator

DanTup commented Jan 24, 2024

Yeah, this would be great. I guess there are a few parts to this:

  1. Keeping track of what's inspected (although it's not clear to me what inspected means here.. things selected in the Widget Inspector, or things sent to the "inspect()" call? I think the goal is to stop the inspector from calling "inspect()" so these things might over lap today, but not in the future)
  2. Handling assignment to these variables (detecting the assignment in an evaluation expression, extracting the variable name and adjusting the evaluation expression accordingly)
  3. Handling evaluation of these variables (sending the names and IDs back in scope of the evaluation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. dds-dap DDS issues related to the Debug Adapter Protocol (DAP) implementation pkg-dds For issues related to the Dart Development Service
Projects
None yet
Development

No branches or pull requests

3 participants