microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.45k stars 1.53k forks source link

Be a little puzzled about the intellisense ??? #847

Closed DFVSQY closed 7 years ago

DFVSQY commented 7 years ago

qq 20170627211903 Doc says that i need a c_cpp_properties.json file to enable code completion and navigation. But i have code completion and navigation whitout this file, like below: qq 20170627212151 qq 20170627212339 My folder doesn't have c_cpp_properties.json file, so why i have code completion and navigation ? Please tell me what happened ? THANKS!

sean-mcmanus commented 7 years ago

If you don't have the c_cpp_properties.json yet, it uses the default. For the Default IntelliSense engine to work, you'll probably need to add additional includePath settings, but with the Tag Parser engine, the default c_cpp_properties.json is more likely to give results.

DFVSQY commented 7 years ago

Thank you for this question. I want to know where the default c_cpp_properties.json locate? How does Tag Parser find my visual studio 2017's includepath? qq 20170629005047

sean-mcmanus commented 7 years ago

The default is constructed internally by our code. You can create/view it under ${workspaceRoot}/.vsocde by doing a C/Cpp: Edit Configurations command. The Tag Parser uses the browse.path setting in the c_cpp_properties.json. We have code that searches for it to properly set the defaults.