Skip to content

browse.path not set automatically when using compile_commands.json #1163

@MathiasMagnus

Description

@MathiasMagnus

I have VS Code 1.17.2 with CppTools 0.14.0 and CMakeTools 0.10.2 and there are some problems with the IntelliSense engine lighting up.

Relevant entries from settings.json

// CMake Configuration
  "cmake.cmakePath": "C:/Kellekek/Kitware/CMake/3.9.0/bin/cmake.exe",

// C/C++ Configuration
  "C_Cpp.intelliSenseEngineFallback": "Disabled",
  "C_Cpp.loggingLevel": "Information"

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).

In c_cpp_propertires.json under Win32 I got

"compileCommands": "${workspaceRoot}/build/compile_commands.json"

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions