vscode-cpptools
vscode-cpptools copied to clipboard
Show a more informative error message when trying to use IntelliSense-related commands when IntelliSense is Disabled.
Environment
- OS and version: Mac M1 Monterey 12.3
- VS Code: 1.69
- C/C++ extension: 1.10.8
- OS and version of remote machine (if applicable): n/a
Bug Summary and Steps to Reproduce
Bug Summary: As was reported several times before, out of nowhere I am getting the 'command 'C_Cpp.ResetDatabase' not found' error. This same style of error occurs for every C/C++ extension command.
Steps to reproduce:
- Delete all configuration and cache files for VS Code everywhere
- Install newest VS Code and newest C/C++ extension
- Install recommended files for Carbon refer to https://github.com/carbon-language/carbon-lang/blob/trunk/.vscode/extensions.json clangd required a configuration change. This likely broke c/cpp extension.
- Open a C/C++ file and attempt to run the command Reset Intellisense Database
- Observe the error occurs
Other Extensions
https://github.com/carbon-language/carbon-lang/blob/trunk/.vscode/extensions.json
Additional Information
This issue persists after a reboot and after deleting every configuration file I can find
Hi @bferguson3 . When you installed the clangd extension, it would have prompted you with something like the following:

Assuming you clicked on Disable IntelliSense, that would have disabled the majority of the functions of the C/C++ Extension. As a result, many of the C/C++ Extension commands involving IntelliSense will fail and trigger the error dialog you referred to.
We can use this issue to track displaying a more informative error message in this scenario. Though, the non-functionality of those features is intentional when IntelliSense is disabled.
Hi Colen,
Thanks for the reply. Yes, that was the message I saw.
Please re-read the ticket. I have done a complete removal of all extensions, VS Code itself, and cache subdirectories. The issue persists.
When you get a chance to look more closely let me know.
On Thu, Jul 21, 2022, 5:21 PM Colen Garoutte-Carson < @.***> wrote:
Hi @bferguson3 https://github.com/bferguson3 . When you installed the clangd extension, it would have prompted you with something like the following:
[image: image] https://user-images.githubusercontent.com/49173979/180317085-5487b59f-ddc9-461c-8a3e-6873588626b6.png
Assuming you clicked on Disable IntelliSense, that would have disabled the majority of the functions of the C/C++ Extension. As a result, many of the C/C++ Extension commands involving IntelliSense will fail and trigger the error dialog you referred to.
We can use this issue to track displaying a more informative error message in this scenario. Though, the non-functionality of those features is intentional when IntelliSense is disabled.
— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-cpptools/issues/9614#issuecomment-1191947293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3QAMYGWO4MTVP47OOWR2DVVG5PNANCNFSM54HQWJ7A . You are receiving this because you were mentioned.Message ID: @.***>
@bferguson3 Do you have the C_Cpp.intelliSenseEngine set to "Disabled" in your settings?
Hi @bferguson3 . Is it possible you missed a settings file (as Sean suggested) which still contains C_Cpp.intelliSenseEngine set to Disabled?
On Mac (if no remoting is involved), I believe the settings files would be in:
/Users/<user>/Library/Application Support/Code/User/settings.json
And potentially in the workspace itself, under: ./.vscode/settings.json.
After removing settings.json files, if you kept the clang extension installed, it likely prompted you again (the dialog I pasted in previously) to disable the C/C++ Extension's IntelliSenseEngine .
If you switch to the latest pre-release version of the C/C++ Extension (1.11.3), and set "C_Cpp.loggingLevel": "Debug", it should now log a message indicating when IntelliSense is disabled due to settings.
We added a fix to 1.12.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.12.0 ...do you see the new error message?