-
Notifications
You must be signed in to change notification settings - Fork 323
Support global evaluation in SDK DAPs #4636
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 provides support for basic global evaluation matching the legacy DAPs. The first available thread is used (because there's currently no way for the user to select a thread) and we look up a library from a file URI provided in the `context` field. In future I hope there's a standard DAP way of getting a file from the client (see microsoft/vscode#134452). See #52574 See Dart-Code/Dart-Code#4636 Change-Id: I7bfa466001142e7e39ebb270ce65f4746a9affcd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312980 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
What will it take to support evaluating in the context of the library of the currently open file and/or adding some affordance in the UI to select the library to use? |
That's actually what we do :) The comment above didn't mention it, but we pass through the active file in the Dart-Code/src/extension/providers/debug_adapter_global_evaluation_context_factory.ts Lines 34 to 39 in 7389b2c
And then in the debug adapter, we read this and find the relevant library for that script: There's no UI to allow you to select, it just uses the current file. We could change this, although I don't know how nice the UI would be - but you can always open a specific file if you want to use that library. What we don't support though is a way to choose the isolate. |
In the old DAPs we supported some basic global evaluation using the root library and the first available isolate. We should support the same in the new SDK DAPs, but ideally use the current open file rather than the root library.
The text was updated successfully, but these errors were encountered: