You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
browse.path not set automatically when using compile_commands.json #1163
Because all my C++ projects are CMake based, I turn off the Tag-based engine, because I want to make sure. IntelliSense errors should always be compilation errors (as it usually is in big brother VS).
Once I do this, symbols show in the hover tooltips correctly (std::vector<T, alloc<T>>::cend() shows properly with correct return type), but trying to navigate there in code does not work. The blue tooltip says No definition found for 'cend'.
Am I doing something wrong?
Reacted by Alexander Grund, dmitrii1971, Johannes Schmitz, Edward Bordin, Leroy Rügemer, Aleksey Gurtovoy, ajihyf , pe224, Idan Pazi and smilediver
Unable to retrieve file system information for C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*. error = -1
which seems fair enough, because the STL headers are not located in that folder, because VS is installed in a non-default location, hence there's nothing to find in the folder where the log entry suggests to find system information.
Thanks Bob Brown (@bobbrow) for the heads up. I am preparing slides for a seminar series at my institute on Nov. 20-21 where I wanted to demo the new awesome in VS Code, how I finally caught up to big brother VS in terms of C++ usability in the context of CMake. It seems code navigation did not make it into this release. Could I hope to incorporate this feature if I made my slides on the 19th? :)
Really, the less json I have to show to people, the better the impression is. I am surprised that only the hotkey menu received a GUI, but not the ordinary settings.json.
Unfortunately, this will not be ready in November. When opening a new folder without a c_cpp_properties.json file in it, we should (hopefully) be picking a reasonable set of defaults for you (system includes + workspaceRoot).
changed the title [-]CppTools + compile_commands.json + CMakeTools + Go to Definition = No definition found for symbol[/-][+]browse.path not set automatically when using compile_commands.json[/+]on Jul 16, 2018
Go to Defintion on std::vector<>::cend() should work with 0.19.0. I don't think the browse.path population with compile_commands.json was implemented though.
Activity
MathiasMagnus commentedon Oct 24, 2017
The log.txt of the extension only argues about
which seems fair enough, because the STL headers are not located in that folder, because VS is installed in a non-default location, hence there's nothing to find in the folder where the log entry suggests to find system information.
bobbrow commentedon Oct 24, 2017
code browsing (navigation) is still powered by the tag parser engine, so you still need to set
"browse.path"for the time being.MathiasMagnus commentedon Oct 24, 2017
Thanks Bob Brown (@bobbrow) for the heads up. I am preparing slides for a seminar series at my institute on Nov. 20-21 where I wanted to demo the new awesome in VS Code, how I finally caught up to big brother VS in terms of C++ usability in the context of CMake. It seems code navigation did not make it into this release. Could I hope to incorporate this feature if I made my slides on the 19th? :)
Really, the less json I have to show to people, the better the impression is. I am surprised that only the hotkey menu received a GUI, but not the ordinary settings.json.
bobbrow commentedon Oct 24, 2017
Unfortunately, this will not be ready in November. When opening a new folder without a c_cpp_properties.json file in it, we should (hopefully) be picking a reasonable set of defaults for you (system includes + workspaceRoot).
[-]CppTools + compile_commands.json + CMakeTools + Go to Definition = No definition found for symbol[/-][+]browse.path not set automatically when using compile_commands.json[/+]sean-mcmanus commentedon Sep 28, 2018
Go to Defintion on std::vector<>::cend() should work with 0.19.0. I don't think the browse.path population with compile_commands.json was implemented though.
elahehrashedi commentedon May 13, 2020
This issue is fixed in 0.28.0.
0.28.0 release: https://github.com/microsoft/vscode-cpptools/releases/tag/0.28.0