Enable Go To Definition for VSCode in VM#24540
Conversation
|
I have a fix for the test failing on the ARM64 leg - see #24539 |
|
@AaronRobinson perhaps you'd like to review? |
AaronRobinsonMSFT
left a comment
There was a problem hiding this comment.
This is nice to have. My only fear is the slow march toward more and more IDE metadata being added to the source control. I like the intent, but fear the cruft.
@jkotas or @stephentoub Any opinions regarding this kind of IDE metadata that helps the developer experience?
|
I do not have an opinion. I do not use any of this for my day-to-day work. |
|
My hope is that the cruft does not build up much because we can use the cmake integration. Meantime it's just an experiment to see whether we can improve the VS Code experience for contributors. |
|
We have cpp code in the repo not under /vm/. We also have editor related files (e.g. .editorconfig) at the root of the repo. Sould this .vscode directory be at the root, too? |
|
Nice. I've been using the same thing that I've created locally for my purposes and I haven't realized it might be something that would be worth checking in. |
|
Btw, it is not just to enable go to definition. Another value it has that it also correctly shows blocks of code under specific defines as active or inactive (displayed in dimmed colors) based on the definitions in the config file. |
I'm learning how this works but my assumption is that we need a separate folder for each unique set of include paths and defines, or some approximate group. The defines and include paths for eg., \vm and \classlibrary are not the same (although mostly the same). Eg., the latter does not define |
|
BTW I think this will really be valuable when they implement Find References. It is the #2 ask for the VSCode C++ plugin and it appears as if it will come soon. |
Commit migrated from dotnet/coreclr@ed790a8
This change enables VSCode to "go to definition" in the \vm\ folder. It contains no user-specific paths.
At this point it only includes the default, Windows configuration. This alone is helpful, and we can use it as the basis for improvement. This change does not affect anyone not using VS Code with the C++ extension.
It may be possible to improve this by using the CMAKE compile commands feature to remove hard coded defines, as well as by adding more platforms and configurations and supporting the rest of the tree.