Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode C++ IntelliSense bug when adding new files #1187

Closed
Yuri6037 opened this issue Apr 18, 2020 · 6 comments
Closed

VSCode C++ IntelliSense bug when adding new files #1187

Yuri6037 opened this issue Apr 18, 2020 · 6 comments
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure fixed (release pending) fixed in pre-release and is pending official release
Milestone

Comments

@Yuri6037
Copy link
Contributor

Yuri6037 commented Apr 18, 2020

Brief Issue Summary

VSCode C++ tools bugs when adding new files in a project manged by ms-vscode.cmake-tools.

When adding a new hpp/cpp file in the project workspace CMakeLists.txt, the VSCode C++ IntelliSense gets bugged and refuses to process correctly the new hpp/cpp file. It is needed to close VSCode, run cmake .. inside the build folder in a Powershell and then re-open VSCode in order to get it to work.

Expected:

When saving the CMakeLists.txt of a CMake sub-directory, VSCode C++ tools should automatically be refreshed with the new files. That behaviour is already fine under Visual Studio Community 2019.

Apparent Behavior:

VSCode C++ tools IntelliSense does not get refreshed with the new files and requires full editor reload with powershell console in order to rebuild the cmake project.

Platform and Versions

  • Operating System: Windows 10 x64
  • CMake Version: cmake version 3.16.0-rc3
  • VSCode Version: 1.42.1
  • CMake Tools Extension Version: 1.3.1
  • Compiler/Toolchain: Visual Studio Community 2019 Release - amd64

Other Notes/Information

Tested on a projected first initialized with cmake Visual Studio 2019 generator.

@andreeis
Copy link
Contributor

Another workaround (besides reloading) is to configure after editing the CMakeLists.txt. Hopefully not that inconvenient before we get to fix this.

@andreeis andreeis added enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure labels Apr 22, 2020
@andreeis andreeis added this to the Backlog milestone Apr 22, 2020
@Yuri6037
Copy link
Contributor Author

Yuri6037 commented Apr 22, 2020

I can try to do it myself, at least if I can get a VSCode development environment working...

EDIT: Finally could get this extension in development mode. I would say it's pretty slow to develop extensions for VSCode: I need to wait approx 2 minutes everytime I edit a line of code as there's no immediate recompilation like there is in many other JS framework...

@andreeis
Copy link
Contributor

That would be great. Let us know if you have any questions about the code base or if you encounter any issues during developing the fix for this issue. We'll be happy to review a PR when you send one.

@Yuri6037
Copy link
Contributor Author

I've got something working in local where I can add new files, edit my CMake, and right on CMake save it runs CMake configure which then updates intellisense, a pretty quick fix

@andreeis
Copy link
Contributor

CMake Tools 1.4.0 Beta is available on GitHub.
https://github.com/microsoft/vscode-cmake-tools/releases/tag/1.4.0-beta

Please try it out and let us know if you encounter any issues.

@andreeis
Copy link
Contributor

This fix is available in CMake Tools #1.4.0 which has been released.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure fixed (release pending) fixed in pre-release and is pending official release
Projects
None yet
Development

No branches or pull requests

2 participants