[Wip] Add a server analysis API to retrieve a mapping from 'dart:' URIs to 'file:' URIs. #47377
Labels
analyzer-server
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
To register a proper breakpoint in SDK Code, IDEs needs to knows that a given source file is related to a
dart:
Uri.The analysis server parses
.yaml
files and knows that a given files is mapped to adart:
URI. Exposing this with an API will avoid to find a workaround in each IDE.Example using VSCode :
print('Dart');
print
statement and 'go-to-definition'print
source codeThe breakpoint is added with the
file:
URI that the IDE gets from the analysis server.When launching the VM from the IDE, breakpoint will not be hit as the VM can't associate the
file:
URI to adart:
URI.This can't be fixed properly at the VM level because the VM usually loads SDK librairies from snaphsot files so it can't resolve a
file:
URI.To avoid duplicating .yaml parsing code or relating on hacks (guessing a file is from the SDK), it might be useful to add an API to the analysis server.
Related issues :
The text was updated successfully, but these errors were encountered: