microsoft / microsoft/vscode-cpptools
Support for vcxproj/sln projects
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: Windows 11
- VS Code Version: 1.74.0-insider
- C/C++ Extension Version: v1.13.3
I'm trying to use vscode with C++ projects originally created in Visual Studio. These projects are configured via .sln and .vcxproj files. The code navigation is very limited. I cannot "go to definition" or "go to delcaration" when those definitions and declarations are in other files. I believe this is because cpptools doesn't parse vcxproj and sln files in the same way that it parses compile_commands.json databases or other similar files.
Bug Summary and Steps to Reproduce
Bug Summary:
"go to definition" or "go to delcaration" does not work when those definitions and declarations are in other files. This occurs in projects based on .vcxproj files
Steps to reproduce:
- Open a vcxproj/sln based project
- Click "Go To Declaration"
- editor doesnt show dclaration
Expected behavior
Ability to fully use all features that rely on cpptools knowing how the project is compiled.
Code sample and Logs
`c_cpp_properties.json`:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22621.0",
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"mergeConfigurations": true
}
],
"version": 4
}
### Screenshots
_No response_
### Additional context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the reported .sln and .vcxproj project and the shown c_cpp_properties.json configuration, following the Go To Declaration steps. Compare how these projects provide compilation information with compile_commands.json support. Done means declarations and definitions in other files are found and the relevant cpptools features work for Visual Studio projects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- compilers, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100