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

Errors from the BatchedExpressionEvaluator on object inspection #2309

Closed
elliette opened this issue Dec 18, 2023 · 12 comments · Fixed by #2343
Closed

Errors from the BatchedExpressionEvaluator on object inspection #2309

elliette opened this issue Dec 18, 2023 · 12 comments · Fixed by #2343

Comments

@elliette
Copy link
Contributor

See for example inspecting a Record on chrome:

Screenshot 2023-12-18 at 2 11 21 PM

versus on macos:

Screenshot 2023-12-18 at 2 13 21 PM

This is because the library (and therefore the library URI) for the evaluate request is null:

FYI @annagrin

@elliette
Copy link
Contributor Author

I did some looking into this. There are a few things we can do to improve this:

@annagrin
Copy link
Contributor

AFAIK there should be no evaluate() calls here - how is the example debugged? Are the images from vscode or devtools?

@annagrin
Copy link
Contributor

Here is what I see in VSCode, for example:

image

@annagrin
Copy link
Contributor

And devtools:

image

@annagrin
Copy link
Contributor

annagrin commented Jan 10, 2024

I suspect some different logic is used here then we do normally - it would be useful to understand where the evaluate is called from and with with what arguments (might be just not a correct usage of evaluate or a lack of support in dwds)

@elliette
Copy link
Contributor Author

@annagrin figured out what the difference was (why she couldn't initially reproduce whereas I could). She had:

"dart.previewSdkDaps": false

@DanTup - what is the rollout status for the new DAPs?
https://github.com/Dart-Code/Dart-Code/blob/b939d2c45adf2638eac672095c7ac8ed390cffbc/package.json#L2663

@DanTup
Copy link
Contributor

DanTup commented Jan 11, 2024

We're at 100% using SDK DAPs for both Dart and Flutter now:

https://github.com/Dart-Code/Dart-Code/blob/b939d2c45adf2638eac672095c7ac8ed390cffbc/src/extension/experiments.ts#L20-L21

The dart.previewSdkDaps setting will soon be renamed and inverted (to become something like dart.useLegacyDebugAdapters) and I would not recommend anyone has it set to false.

(If you think there are bugs in the SDK DAPs that aren't in the legacy DAPs, please let me know)

@annagrin
Copy link
Contributor

I found what is going on - we never supported evaluate() calls on targets other than a library. Looks like DAP sends evaluate requests on getting variables. Will send a PR to fix!

@annagrin
Copy link
Contributor

Depends on: dart-lang/sdk#54609

@elliette
Copy link
Contributor Author

One note - this is affecting more than just Records. For example, here is what I see when inspecting a Flutter widget's state:

Screenshot 2024-01-12 at 9 56 49 AM

@annagrin
Copy link
Contributor

annagrin commented Jan 12, 2024

One note - this is affecting more than just Records

Yes, I could fix the original bug but the record types still are not displaying correctly due to that additional SDK issue:)

@annagrin
Copy link
Contributor

annagrin commented Jan 22, 2024

Related: dart-lang/sdk#54694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants